Skip to content

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

Merged
cyberw merged 13 commits into
locustio:masterfrom
A1BOCO:patch-percentiles
Mar 12, 2023
Merged

Add PERCENTILES_TO_CHART param in stats.py to make the Response Time Chart configurable#2313
cyberw merged 13 commits into
locustio:masterfrom
A1BOCO:patch-percentiles

Conversation

@A1BOCO

@A1BOCO A1BOCO commented Mar 3, 2023

Copy link
Copy Markdown
Contributor

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
Comment thread locust/test/test_main.py Outdated
Comment thread locust/web.py Outdated
Updated to get percentiles info from stats.py::
Comment thread locust/html.py Outdated
Comment thread locust/main.py Outdated
Comment thread locust/stats.py Outdated
@cyberw

cyberw commented Mar 7, 2023

Copy link
Copy Markdown
Collaborator

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

cyberw commented Mar 7, 2023

Copy link
Copy Markdown
Collaborator

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

A1BOCO commented Mar 7, 2023

Copy link
Copy Markdown
Contributor Author

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

Comment thread locust/html.py Outdated
Comment thread locust/main.py Outdated
Comment thread locust/static/locust.js Outdated
Comment thread locust/templates/report.html
Comment thread locust/test/test_main.py Outdated
Comment thread locust/web.py Outdated
Comment thread locust/web.py Outdated
Comment thread locust/web.py
javascript and html file

Modified test in test_main.py
Comment thread locust/static/locust.js Outdated
Comment thread locust/test/test_main.py Outdated
Comment thread locust/test/test_main.py Outdated
Comment thread locust/stats.py Outdated
@cyberw

cyberw commented Mar 12, 2023

Copy link
Copy Markdown
Collaborator

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