-
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
WebInterface stop updating RPS if Users are doing nothing #2970
Comments
Hey @andreabisello, thanks for reporting! I think this is a known issue where Locust is using the total aggregated RPS |
Wasn't that issue just for avg response times? Anyways, definitely something for us to have a look at, but maybe not right now. PRs welcome tho :) |
I would like to try to help, i'm gonna download the project and take a look =) |
Have a look at https://docs.locust.io/en/stable/developing-locust.html if you haven't already! |
@cyberw Hi, it's me, with the company account :) I have followed your link, everything is installed, up and running. I have
running my locust file,
and i have
opening a locust web ui .... on http://localhost:4000/dev.html
but how i'm suppose to obtain a ux handling the load test done by http://localhost:8089 to see what i'm doing modifying the ux? sorry if the question sounds stupid, i had developed vuejs some years ago, that project it's a bit complicated for me, but i would like to help. thankyou. |
Hi @andreabisello, I think for this ticket you won't have to modify the frontend code, the issue is most likely here: https://github.com/locustio/locust/blob/master/locust/web.py#L463, where you can see the current_rps is always set to the total. You could change this to any number and you would see the change reflected in the frontend. If you do want to make some changes to the frontend, it's probably more useful to run If you have an other questions just let us know don't be shy! |
@andrewbaldwin44 I think the problem is that environment.runner.stats Line 448 in c0c7fd0
Line 111 in c0c7fd0
for that reason the ux stops to update itself : because self.client stops to make calls. if i'm right, maybe we should introduce a timer that update stats even if calls are not be done? |
I believe the issue is that the webui is displaying the "current_rps", which is an average:
It takes into account all of the requests since the beginning of the test, so the RPS will never go back to zero. The part that creates confusion is that the StatsEntry class is used for both request statistics and aggregated statistics, however I don't believe that the If we rewind time a little bit (commit
So calculating the total average RPS for the last 10 seconds. I think the solution here then would be to simply re-introduce this logic in some way |
Prerequisites
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
Python version
3.11
Locust version
2.32.0
Operating system
windows 11
The text was updated successfully, but these errors were encountered: