Hey all who love gatling!
Before I jump over to github and create an issue, I was wondering if this has been tackled or not, the issue is simple. If you want to throttle load at given Rpm which is not a multiple of 60, then you can’t. reachRPS takes in an Int, so if for example, you have to load at say 1000 request per min. What you can get is 960 or 1020 request per minute. (1000/60 = 16.666…, so an int of 16 or 17 rps).
As always happy to contribute!
Regards
Shoaib
Hey,
First, I’m afraid this would be super complicated to implement! I had such a hard time to support non full users per second for the injection profiles (rampUsers(100).during(1.minute)
)! You have to figure out how to smoothen the distribution over time and avoid bursts and non perfect totals (believe me, people will notice and open issues).
Then, I’m personally not fond of throttling
. It’s a limitor that was borrowed from JMeterPlugins’ Ultimate Thread Group and it’s a mere unbounded queue where to push extra traffic. A good way to end up with an OutOfMemoryError. It prefer designing my scenario with a proper injection profile and possibly weighted randomSwitch
if it makes sense.
I know the pain of keeping track of how many requests to let go from the previous, yadi yadi yada. I too am not a big fan of throttling, but there are some genuine use cases, for example SaaS companies who focus on the concurrency and request limits for their tenants. And most of these limits are expressed in terms of minutes. While the load generation for perf testing needs to have a steady and smooth distribution.
Do you mind if I give a crack at this, I’ll open an issue if I can get something working (and enough time from my wife to let me work on it).
Hey @slandelle,
I started tinkering with Throttling, just running some ideas in my head etc. Am I correct to assume that the function Throttling.limit
is being used to get the number of request to send at a given point in time? If so then I think there is some black magic/voodoo that can be done to support RPM. Allowing a double value for RPS is definitely a pain in the neck.
Thanks