# Gatling - have certain percent of users do specific flow

Is it possible in Gatling to have a scenario where 20% of users would do certain actions, 10% of users some other action, and 70% of users another different set of actions?

I thought that `randomSwitch` does that, but I think it is not doing that.
It is the probability you can specify that some chain will execute, it is not the percentage of users doing some specific chain.
Thanks!

What do you think the difference between the two would be? I don’t get it.

Well, the one I am looking for would be like this:
ramp up 10 users over 5 mins.
distribution 20 % - 10% - 70% would mean that
2 users always do flow A, 1 user always does flow B and 7 users always do flow C.

randomSwithc with the same setup 20 - 10 - 70 doesn’t mean that.
It only means that there is a 20% of chance for a user to execute flow A. But that is all it is a chance which means it might also never happen in one run.
I have seen it behave like this in the test. Sometimes within one run of the test flow A would happen but then with the second run, it might not happen.
It doesn’t guarantee me that each time I run the test I will have 2 users executing flow A.

Maybe I am just not thinking this right or don’t understand it entirely. Please correct me if I am wrong.
Maybe my wish is not even desirable behavior in terms of Performance testing realistic scenarios.
I don’t know. I was just curious if Gatling also supports it?

What I understand you describe are different kinds of users.
One kind of user will follow one path. The second, etc.

So, they are different scenarios.

So you can inject them as you want in your simulation.

ramp up 10 users over 5 mins.
distribution 20 % - 10% - 70% would mean that
2 users always do flow A, 1 user always does flow B and 7 users always do flow C.

Do you have a more precise specification of the behavior you would expect, eg:

• “10 users over 5 mins” means 1 user every 30s. Which users would be the ones doing flow A, the ones doing flow B and the ones doing flow C exactly?
• How would things work for “13 users over 5 minutes”?

To be honest I didn’t think of it that way. I don’t know the answers to those questions. Once you ask it like that maybe it seems like it doesn’t make sense.
It kinda makes sense what @sbrevet said, I should just use different scenarios and dedicate the number of users there. I am not 100% sure, but I think you can have multiple scenarios in one simulation. I should refresh my memory with the academy course

Well, I can’t say for sure if this way doesn’t make sense. But for sure, it raises complicated questions I don’t have answers for.

Regarding `setUp`: Gatling - Simulation