0
votes

I don't know if it's a bug or I don't know the real behaviour of Gatling Throttling throttle operation but I don't know how to reproduce a scenario.

I want to have a constant amount of 15 requests per second in 10 minutes.

My setup is as follows:

setUp(scn.inject(constantConcurrentUsers(45) during(10 minutes)).protocols(httpProtocol)).throttle(
    reachRps(15) in (1 seconds),
    holdFor(10 minute))

I'm assuming here that I will have 45 available users (constantConcurrentUsers(45)) to perform the 15 requests per second (reachRps(15)), I will reach this speed in 1 second (in (1 seconds)) an I will hold this speed for 10 minutes (holdFor(10 minutes))

I've tried with 15 constantConcurrentUsers users instead of 45 and the same results.

The question is: Why the max amount of concurrent requests that I can see in the results is 13 and why actually the mean amount of requests per second is more or less 5?

enter image description here

How could I achieve the described scenario?

1

1 Answers

0
votes

As explained in the official documentation:

You still have to inject users at the scenario level. Throttling tries to ensure a targeted throughput with the given scenarios and their injection profiles (number of users and duration). It’s a bottleneck, ie an upper limit. If you don’t provide enough users, you won’t reach the throttle. If your injection lasts less than the throttle, your simulation will simply stop when all the users are done. If your injection lasts longer than the throttle, the simulation will stop at the end of the throttle.