Skip to content

Live stats regression as of 2.43.4 #3451

Description

@Kyle-sandeman-mrdfood

Prerequisites

Description

It seems in #3384 a fix was done for the HTML report, but live RPS polling seems to use the wrong metric now.
If I bump the user count and get an RPS increase, the new datapoints on the graph seem to be the total RPS rather than the latest/current.
Last refreshed at ~13:43:
Image
Another refresh 2 minutes later shows the data after 13:43 was wrong:
(additionally you can see the latest datapoint re-exhibiting the behaviour)
Image

I can't give the source for the above images so I created a separate script below.

Command line

uv run --with locust=2.44.4 locust --autostart -u 10 -r 10 -t 60s

Locustfile contents

from time import time
from locust import HttpUser, task


class HelloWorldUser(HttpUser):
    host = "https://httpbin.dev/delay/"

    def __init__(self, *args, **kwargs):
        super().__init__(*args, **kwargs)
        self.start_time = time()

    @task
    def hello_world(self):
        delay = "1"
        if time() - self.start_time > 30:
            delay = "3"
        self.client.get(delay)

Python version

3.12.12

Locust version

2.44.4

Operating system

linux/macos

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions