Throttle not working

There are a few questions asking almost the same but they didn’t help fixing my problem.

I have the following setup:

val doGet =

exec(

http(“Get-Request”)

.get(urlAdd))

val getScenario =

scenario(“Get scenario”).exec(doGet)

setUp(getScenario.inject(constantUsersPerSec(30) during (10 seconds))).throttle(jumpToRps(1), holdFor(10 seconds)).protocols(httpConf)

My expectation was to get 1 Request per Second over 10 seconds.

I know I have to provide throttle with enough users as it is a bottleneck.

Whatever I try, constantUserPerSec, atOnceUsers, rampUsers … I always get the same result:

The test finishes in the fastest time possible without actually using the throttle.

Here is an example output of the above simulation:

I just tested and throttle works as expected for me:

  • 1 rps for the first 10s
  • THEN, throttle is lifted and and all queued requests/users are processed.
    I suspect you missed this 2 phase.

http://gatling.io/docs/2.0.3/general/simulation_setup.html?highlight=throttle#throttling

“If your injection lasts longer than the throttle, the throttle will simply be lifted when its end is reached, resulting in a burst from queued requests.”

Cheers,

Stéphane

You’re obviously right.
Sorry, didn’t look at the graphs.
That throttle thing is a little hard to grasp, especially the combination with different injects :wink:

Thanks

Wondering if throttle should automatically add a maxDuration…

Thoughts?

I guess that would clean up a lot of misconceptions.
It’s a little weird that injects basically pile up and get released in one big storm at the end of the test run.

Yes, it would make sense.
https://github.com/gatling/gatling/issues/2415