I am trying to use locust to simulate “normal” traffic behavior pattern.
This requires that the number of users (and not only the number of requests) to be none constant, for example, as a factor of the hour and day of week.
The simplest solution is to be able to set num_clients dynamically and the more complex solution, but better in my case, is to set each user a session length (constant or by some probabilistic distribution) or a chance to “disconnect” at the end of each request and on the other side a “stream” of users are spawned in a dynamically set rate.
I saw http://uu.diva-portal.org/smash/get/diva2:685934/FULLTEXT01.pdf and it seems that much of what was described there is already in the latest version, so I have the feeling that the changes are accomplishable without major changes to the package.
What is the best way to accomplish this task?
Thanks