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

Excessive precision of metrics in losust csv stats #1501

Closed
vstepanov-lohika-tix opened this issue Aug 4, 2020 · 3 comments
Closed

Excessive precision of metrics in losust csv stats #1501

vstepanov-lohika-tix opened this issue Aug 4, 2020 · 3 comments
Labels

Comments

@vstepanov-lohika-tix
Copy link
Contributor

vstepanov-lohika-tix commented Aug 4, 2020

Describe the bug

After upgrade from 0.14.4 to 1.1.1 the most of metrics in csv report became with excessive precision (> 10 digits after point)
It doesn't make sense and makes report hard readable.
Not reproduced in console stats

Expected behavior

Precision for time metrics & content size should be integer number.
Precision for requests rate - float with maximum 2-3 digits after point.

Actual behavior

Over 10 digits after point:
image

Steps to reproduce

Run any test with HTTP requests & --headless & --csv=report option and check report-stats.csv result file.

Environment

  • OS:
  • Python version: 3.7.2
  • Locust version: 1.1.1
  • Locust command line that you ran:
    locust -f {locust_file_path} --headless -u {users_number} -r {hatch_rate} --run-time={run_time} --csv=results --exit-code-on-error=0
  • Locust file contents (anonymized if necessary): - complicated.
@heyman
Copy link
Member

heyman commented Aug 4, 2020

It seems likely that this was caused by #1428. Previously - when we generated the CSV data manually - we formatted the values using string formatting (%.2f). Now when we're using the built in csv module, we should probably wrap the values in round() calls.

@vstepanov-lohika-tix
Copy link
Contributor Author

@heyman please take a look draft PR above, will it be ok?

@cyberw cyberw closed this as completed Aug 8, 2020
@heyman
Copy link
Member

heyman commented Aug 10, 2020

👍👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants