Closed
Description
Prerequisites
- I am using the latest version of Locust
- I am reporting a bug, not asking a question
Description
let's suppose we are spawning 5 HttpUser and every HttpUser makes a self.client.get calls.
The webinterface update itself.
but let's suppose the task has a counter, and after the counter is passed, no self.client.get calls are done.
le't suppose every user will has a counter set to 3, and if >3, do nothing.
increasing the counter +1 at every execution,
we expect 5*4=20 calls.
as you see, 20 calls are done, the test still running
but taking a look at the ux, it looks like it's still doing 2.33 rps,
that's not real,
because no one is doing nothing
the ux should show 0
Command line
locust -f .\github_webux.py
Locustfile contents
from locust import HttpUser
import time
class WebuxUser(HttpUser):
host = ""
def on_start(self) -> None:
self.counter = 0
@task
def to_something(self):
if self.counter > 3:
return
self.client.get("https://docs.locust.io/")
self.counter += 1
time.sleep(1)
Python version
3.11
Locust version
2.32.0
Operating system
windows 11