Hi, I have been playing with different ways to control the throughput and was wondering what is difference between
setUp(scn.inject(rampUsers(20) over(1 seconds), constantUsersPerSec(20) during(15 seconds)))
vs using throttling ramping and holding the users as following.
setUp(...).throttle(reachRps(20) in (1 seconds), holdFor(15 seconds))
What is the difference between above?
There are several different models, and which to use depends on your goals. Are you trying to model new users arriving, a certain number of concurrent users, or a certain number of transactions per second?
Throttle is a rate limiter. If your injection model would inject requests at 30 per second, and you have told it to limit to 20 per second, then users will be paused in order to reduce the request rate.
Whereas ramping users is for building up a number of concurrent users over time.
Constant users per second is just that: start a new user every so often. But if a user does more than one transaction during its lifetime, the number of transactions per second will be different than the number of users per second.