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

Keep csv files open #1522

Merged
merged 1 commit into from
Aug 18, 2020
Merged

Keep csv files open #1522

merged 1 commit into from
Aug 18, 2020

Conversation

lhupfeldt
Copy link
Contributor

The intent of is to reduce os calls and disk IO.
This code goes on top of my other PR #1504, so submitting as draft.

@codecov
Copy link

codecov bot commented Aug 16, 2020

Codecov Report

Merging #1522 into master will increase coverage by 0.35%.
The diff coverage is 93.20%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1522      +/-   ##
==========================================
+ Coverage   81.58%   81.94%   +0.35%     
==========================================
  Files          28       28              
  Lines        2466     2509      +43     
  Branches      382      381       -1     
==========================================
+ Hits         2012     2056      +44     
+ Misses        359      358       -1     
  Partials       95       95              
Impacted Files Coverage Δ
locust/main.py 20.44% <33.33%> (+0.44%) ⬆️
locust/stats.py 90.02% <98.82%> (+0.98%) ⬆️
locust/env.py 96.72% <100.00%> (ø)
locust/web.py 90.15% <100.00%> (+0.15%) ⬆️
locust/argument_parser.py 77.19% <0.00%> (+0.20%) ⬆️
locust/runners.py 83.23% <0.00%> (+0.38%) ⬆️
locust/user/task.py 96.75% <0.00%> (+0.54%) ⬆️

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 12bfb26...e0e35dc. Read the comment docs.

@cyberw
Copy link
Collaborator

cyberw commented Aug 16, 2020

Does this also split stats into stats and stats_csv? It might make sense, but as I dont really know the web interface code very well, I can't really judge if that is a good idea.

@lhupfeldt
Copy link
Contributor Author

Does this also split stats into stats and stats_csv? It might make sense, but as I dont really know the web interface code very well, I can't really judge if that is a good idea.

Yes, it splits out the csv generation. I think it gives better readability, but I can merge it back into stats if you prefer.

@cyberw
Copy link
Collaborator

cyberw commented Aug 18, 2020

Yes, I would prefer keeping them in the same file (but we can change it later maybe)

@lhupfeldt
Copy link
Contributor Author

lhupfeldt commented Aug 18, 2020 via email

@cyberw
Copy link
Collaborator

cyberw commented Aug 18, 2020

Good to go? oh right, still waiting to un-split stats/stats_csv (preferably by rewriting the history so that git-blame is not distorted)

@lhupfeldt
Copy link
Contributor Author

Good to go? oh right, still waiting to un-split stats/stats_csv (preferably by rewriting the history so that git-blame is not distorted)

I think I will be to blame for the stats-csv stuff regardless how it is un-split, since all lines will be indented under the class.
So the easiest will be to simply copy stats_csv content back into stats.
Any objection to that?

@lhupfeldt
Copy link
Contributor Author

lhupfeldt commented Aug 18, 2020

Created a new single commit and force pushed. Should keep the blame changes to a minimum, although not sure there is much difference.

@lhupfeldt lhupfeldt marked this pull request as ready for review August 18, 2020 11:57
@cyberw
Copy link
Collaborator

cyberw commented Aug 18, 2020

LGTM. Thanks!

@cyberw cyberw merged commit 6fdc677 into locustio:master Aug 18, 2020
@lhupfeldt lhupfeldt deleted the keep_csv_files_open branch August 18, 2020 12:18
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