question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

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

See original GitHub issue

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

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
cyberwcommented, Aug 23, 2022

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

0reactions
alterhu2020commented, Aug 23, 2022

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 ?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration — Locust 2.14.0 documentation
The -f/--locustfile option accepts a single directory of locustfiles as an option. Locust will recursively search the directory for *.py files, ignoring files ......
Read more >
Quick Tutorial on Locust
Start the server in the background through the following command: $ simple-server > /dev/null & · Start another shell (either using tmux or...
Read more >
Locust + Python Examples: Variables + Assertions - BlazeMeter
The next step is creating a file for our script named locustfile.py. In this file we will define the HTTP requests to be...
Read more >
Implementing dynamic allocation of user load in a distributed ...
Below is code for a very basic locust-file (a python-file) to load test towards locust's own web server. It just sends GET requests...
Read more >
Load Testing with Locust (Part 1) | by Beau Lyddon
We profile not only with changing traffic, but also steady traffic over longer ... And run the following command to start the server:...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found