Skip to content
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

Add PERCENTILES_TO_CHART param in stats.py to make the Response Time Chart configurable #2313

Merged
merged 13 commits into from
Mar 12, 2023

Conversation

A1BOCO
Copy link
Contributor

@A1BOCO A1BOCO commented Mar 3, 2023

Added --percentiles command line argument which is for response time chart in chart page and download report page.
Default value is 95% and 50%.
example . # locust -f locust_file.py --percentiles 0.99,0.8

This is from issue #2311

Percentiles were originally 50% and 95%. Command line parameter can
specify chart and report percentiles. Defalt value is 50% and 95%.
Old parameters --percemtile1 and percentile2 were removed.
Added test case in test_main for -percentiles parameter
locust/test/test_main.py Outdated Show resolved Hide resolved
locust/web.py Outdated Show resolved Hide resolved
Updated to get percentiles info from stats.py::
locust/html.py Outdated Show resolved Hide resolved
locust/main.py Outdated Show resolved Hide resolved
locust/stats.py Outdated Show resolved Hide resolved
@cyberw
Copy link
Collaborator

cyberw commented Mar 7, 2023

Once you're done, rename the PR to something more appropriate, now that we're not using a command line argument

@A1BOCO A1BOCO changed the title Added --percentiles command line argument. issue#2311 Added PERCENTILES_TO_CHART param in stats.py to make Response Time Chart configurable : issue#2311 Mar 7, 2023
@cyberw
Copy link
Collaborator

cyberw commented Mar 7, 2023

Nice. I think you accidentally commented out the import of pty in test_main.py. Ideally the test would actually check the UI to see that it took effect, but meh.

Add it to the documentation at the bottom of docs/configuration.rst, and then we're pretty much done!

@A1BOCO
Copy link
Contributor Author

A1BOCO commented Mar 7, 2023

I have corrected test_main.py and format of stats.py. Also update configuration.rst. Please review them.

locust/html.py Outdated Show resolved Hide resolved
locust/main.py Outdated Show resolved Hide resolved
locust/static/locust.js Outdated Show resolved Hide resolved
locust/test/test_main.py Outdated Show resolved Hide resolved
locust/web.py Outdated Show resolved Hide resolved
locust/web.py Outdated Show resolved Hide resolved
locust/web.py Outdated Show resolved Hide resolved
javascript and html file

Modified test in test_main.py
locust/static/locust.js Outdated Show resolved Hide resolved
locust/test/test_main.py Outdated Show resolved Hide resolved
locust/test/test_main.py Outdated Show resolved Hide resolved
locust/stats.py Outdated Show resolved Hide resolved
@cyberw
Copy link
Collaborator

cyberw commented Mar 12, 2023

Nice!

@cyberw cyberw changed the title Added PERCENTILES_TO_CHART param in stats.py to make Response Time Chart configurable : issue#2311 Add PERCENTILES_TO_CHART param in stats.py to make the Response Time Chart configurable Mar 12, 2023
@cyberw cyberw merged commit 0e56a8b into locustio:master Mar 12, 2023
@A1BOCO A1BOCO deleted the patch-percentiles branch March 12, 2023 21:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants