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.

Run locust as a job but still have access to the API.

See original GitHub issue

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

I want to be able to run locust as a job i.e. locust -c 100 -r 10 --run-time 30m and still have access to the stats API and custom endpoints. Right now it forces me to run it with --no-web which removes API access.

Describe the solution you’d like

Allow them to run together or partial versions of them.

Describe alternatives you’ve considered

Starting up a separate Flask server

Additional context

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:4
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
heymancommented, Apr 21, 2020

Maybe we could have a new option, like --swarm-delay/-d, which could double as a way to specify automatic start in web-mode, and to provide a delay to start the test in both web and headless mode.

I’m not very fond of adding an extra command line option for this. It doesn’t seem like a common enough use-case.

Here’s documentation on how to start the WebUI using code in 1.0: https://docs.locust.io/en/latest/use-as-lib.html

0reactions
cyberwcommented, May 22, 2020

I think @heyman s last comment is a good solution for this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

API — Locust 2.14.0 documentation
Class defining a sequence of tasks that a User will execute. Works like TaskSet, but task weight is ignored, and all tasks are...
Read more >
Load Testing on Web Application API Using Locust - Medium
Here is the example code using Locust to test the web app. We try to execute a task from the code to validate...
Read more >
Is it possible to run code after finishing a locust instance?
Let's say this is the primary file I would run in terminal i.e locusts -f main.py . Is it possible to have it...
Read more >
Performance Testing an ML-Serving API with Locust!
In fact, some companies might recognize this as the job of a machine ... With our API still running, open a new tab...
Read more >
Performance and Load Testing using Locust - PFLB
Locust is an open source load testing tool. Instead of configuration formats or UIs, with Locust you get a familiar python framework that...
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