Skip to content
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

After the locustfile server loaded with --class-picker, how can change to another locustfile dynamically without restart server? #2169

Closed
alterhu2020 opened this issue Aug 23, 2022 · 5 comments

Comments

@alterhu2020
Copy link
Contributor

alterhu2020 commented Aug 23, 2022

Is your feature request related to a problem? Please describe.

Yes, I want to change the loustfile content no need to restart the master/worker service again

Describe the solution you'd like

  1. First start the locust server UI with command: locust -f /scripts --class-picker and the script folder contains one locustfile, file name is locustfile1.py
  2. From the webui, i choose the userclass as locustfile1.py to run the testing
  3. At the same time I modify the file content is locustfile1.py, then I from the webui started a new test for the same locust user: locustfile1.py
  4. The problem is the script running is not loaded the changed content in locustfile.py
  5. Another problem is that when the server is up, I create another file in the folder : script called locustfile2.py, but from the webUI UserClasses dropdown pickup, I cannot find the locustfile2.py

Describe alternatives you've considered

NO

Additional context

NO

@cyberw
Copy link
Collaborator

cyberw commented Aug 23, 2022

You need to restart locust for any changes to the files to take effect.

@alterhu2020
Copy link
Contributor Author

You need to restart locust for any changes to the files to take effect.

How can I prevent to restart the locustfile everytime, because everytime I need to restart the slave/worker together with more than 3 mins? thanks

@cyberw
Copy link
Collaborator

cyberw commented Aug 23, 2022

You cant. But if you're debugging your scripts and making lots of changes then just dont run distributed.

@alterhu2020
Copy link
Contributor Author

You cant. But if you're debugging your scripts and making lots of changes then just dont run distributed.

The problem is when I run from my local machine, the network latency prevent the locust only can run more than 500 concurrent users, it will return the http status code 0 when exceeded the maxinum latency, that's why I run from distributed mode and change the locust file many times.

So there's no way to make locust can run the changed locustfile content, right ?

@cyberw
Copy link
Collaborator

cyberw commented Aug 23, 2022

No. Sorry. You can use something like locust-swarm automate the process of distributing the test and and starting though.

@alterhu2020 alterhu2020 closed this as not planned Won't fix, can't repro, duplicate, stale Aug 26, 2022
@cyberw cyberw added the wontfix label Aug 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants