Small typo in Description of example in generating-custom-load-shape.rst. Spawn rate in description and code are different. Example mentions:
This shape class will increase user count in blocks of 100 and then stop the load test after 10 minutes
Code to contain:
spawn_rate = 100
spawn_rate = 20
It's not a typo, the spawn_rate here is not related to increase user count in blocks of 100 馃檪
It's this part: user_count = round(run_time, -2)
The -2 here rounds to the nearest 100 and that is what is blocks of 100 is about. Example:
>>> for i in [10, 40, 60, 140, 160, 220, 280]:
... print(round(i, -2))
...
0
0
100
100
200
200
300
Make sense?
I remember being confused by the same thing and having to look up round() to see what it did :)
Maybe we could clarify it a little by adding a comment on that line?
Maybe we could clarify it a little by adding a comment on that line?
Sure thing. PRs welcome 馃槅
Would this do?
https://github.com/locustio/locust/pull/1561
Fixed!