-
Notifications
You must be signed in to change notification settings - Fork 3.2k
HTML report uses current_rps instead of total_rps for req/s column #3355
Copy link
Copy link
Closed
Labels
Description
Prerequisites
- I am using the latest version of Locust
- I am reporting a bug, not asking a question
Description
Description
The HTML report generated via --html uses current_rps (a ~10-second
sliding window average) for the req/s column instead of total_rps
(total requests / total test duration). This makes the HTML report
inconsistent with the final console summary, which correctly uses
total_rps since the fix in #1152.
Since the HTML report is a post-test artifact representing the
entire test run, it should use total_rps — not a stale snapshot
of whatever the last ~10 seconds of the test looked like.
How the inconsistency arises
html.py calls to_dict() without any current flag: Code Link
"requests_statistics": [stat.to_dict() for stat in requests_statistics],
Command line
locust -f locustfile.py --headless -u 5 -r 5 -t 30s --html repro_report.html --only-summary
Locustfile contents
from locust import HttpUser, task, between
class ReproUser(HttpUser):
wait_time = between(0.1, 0.2)
host = "https://httpbin.org"
@task
def get_ip(self):
self.client.get("/ip")Python version
3.12
Locust version
2.32
Operating system
Linux
Reactions are currently unavailable