Damien
1
Hi,
I’m trying to inject users following this pattern :
- X users over Y seconds
- NothingFor Z seconds
- X+a users over Y seconds
- NothingFor Z seconds
- X+2a users over Y seconds
- NothingFor Z seconds
`
rampUsers(10) over(60 seconds),
nothingFor(30 seconds),
rampUsers(20) over(60 seconds),
nothingFor(30 seconds),
`
I’ve read http://gatling.io/docs/2.0.0-RC4/cheat-sheet.html but I can’t find a better way to do it.
Thanks
IMO, the simplest solution to achieve what you want is this :
`
val factor = 2
val newUsersByIteration = 10
val injectionProfile = (1 to factor).flatMap(mult => Seq(rampUsers(10 + (mult * newUsersByIteration) over(60 seconds), nothingFor(30 seconds)))
setUp(scn.inject(injectionProfile: _*))
`
Hope this helps !
Cheers,
Pierre
Damien
3
Hi,
Perfect.
Now I am wondering if it ispossible to “wait” for the first 10 users to complete the scenario before launching the 10 + 10 next.
Damien
5
Well, the rendezvous cannot be used in the setUp block. (Correct me if I’m wrong)
That could work If i’m able to know the number of users. Then I could do something like
`
val parentScenario = exec(myScenario).rendezVous(/number here/)
`
But with the solution you ( you perfectly answered the original question btw) provided, I’m not able to calculate the current number of users.