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

Docs: update test statistics page with example responses #747

Merged
merged 4 commits into from
Apr 23, 2018

Conversation

aldenpeterson-wf
Copy link
Contributor

Provide an example in the docs based on this Stack Overflow question.

@codecov
Copy link

codecov bot commented Mar 9, 2018

Codecov Report

Merging #747 into master will decrease coverage by 0.8%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #747      +/-   ##
==========================================
- Coverage   65.93%   65.13%   -0.81%     
==========================================
  Files          14       14              
  Lines        1374     1417      +43     
  Branches      214      222       +8     
==========================================
+ Hits          906      923      +17     
- Misses        421      443      +22     
- Partials       47       51       +4
Impacted Files Coverage Δ
locust/core.py 78.97% <0%> (-8.85%) ⬇️
locust/main.py 26.16% <0%> (-0.5%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 592532b...86dbdb1. Read the comment docs.


$cat example_distribution.csv
"Name","# requests","50%","66%","75%","80%","90%","95%","98%","99%","100%"
"GET /",31,4,4,4,4,4,4,4,4,4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't the "Method" field header missing here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure, it's identical to what is generated by locust for the stats pages currently.

Copy link
Member

@cgoldberg cgoldberg Mar 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh I see. Method and Name are merged into a "Name" column. This seems like a bug to me (though unrelated to your PR)

@@ -9,13 +9,31 @@ First, when running Locust with the web UI, you can retrieve CSV files under the
Secondly, you can run Locust with a flag which will periodically save the CSV file. This is particularly useful
if you plan on running Locust in an automated way with the ``--no-web`` flag::

locust -f locust_files/my_locust_file.py --csv=foobar --no-web -n10 -t10m
locust -f examples/basic.py --csv=example --no-web -n10 -t10m

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is example the full name of the csv file? Might want to name it example.csv

Copy link
Contributor Author

@aldenpeterson-wf aldenpeterson-wf Mar 9, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the type of file gets added, so providing example results in example_distribution.csv and example_requests.csv

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gotcha. that's confusing. maybe note that in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added clarification there

Copy link
Member

@cgoldberg cgoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👍


or for v0.8 (where the ``-t`` option isn't available)::

locust -f locust_files/my_locust_file.py --csv=foobar --no-web -n10 -c10
locust -f examples/basic.py --csv=example --no-web -n10 -c10
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is -n switch working? If not (which I suspect) maybe we should either remove it from the example or reintroduce it to the code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, will update - it worked when I originally wrote this functionality :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aldenpeterson-wf can you update ^^ ? then let's get this merged.

Copy link
Member

@cgoldberg cgoldberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@aldenpeterson-wf aldenpeterson-wf merged commit 04e1bb2 into locustio:master Apr 23, 2018
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.

3 participants