-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Load shapes not removing users when user_classes changes #2714
Comments
I feel the problem could be somewhere in the https://github.com/locustio/locust/blob/master/locust/dispatch.py#L161-L192 |
Yea, I think this has probably never worked. Basically a changed user distribution in the return value from tick cant stop users, and I think it would be hard to fix. A workaround could be just stopping all the users between the stages:
|
Thank you so much for looking into this @cyberw ! Nice workaround... I did try a version of that but I was returning the classes as well. I didn't think of not returning the classes in the
|
Hmm.. yea I dont know why that doesnt work. I should probably document this as a limitation or something. |
This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This issue was closed because it has been stalled for 10 days with no activity. This does not necessarily mean that the issue is bad, but it most likely means that nobody is willing to take the time to fix it. If you have found Locust useful, then consider contributing a fix yourself! |
Prerequisites
Description
Hello there... it looks like load shapes aren't removing users as one would expect.
It looks like that if I want to change the user classes in each tick to simulate stages as described in the doc , we can only add users/classes to previous stages, not remove them.
Using a slighly modified version of the example in the doc, this is what I'm trying to run exactly:
Something like this:
To make troubleshooting easier, I setup the users so that:
UserA
only makes calls to google.comUserB
only makes calls to yahoo.comWe'll notice that calls to yahoo.com (UserB) are never made.
Here's the slack thread for more info:
https://locustio.slack.com/archives/C3NUJ61DJ/p1714504631777939
Command line
python -m locust -f src/xxxx/test.py --users 5 --run-time 20 --json --loglevel DEBUG --class-picker
Locustfile contents
Python version
3.11
Locust version
2.27.0
Operating system
Amazonlinux 2023
The text was updated successfully, but these errors were encountered: