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

Download full history - see issue 1468 #1504

Merged
merged 4 commits into from
Aug 18, 2020
Merged

Download full history - see issue 1468 #1504

merged 4 commits into from
Aug 18, 2020

Conversation

lhupfeldt
Copy link
Contributor

Adds another download link to the UI when --csv-full-history was specified

See: #1468

Does not implement the suggested 'download-all'

@lhupfeldt
Copy link
Contributor Author

I read the contributing guidelines but those seems to be related only to the release procedure?

@codecov
Copy link

codecov bot commented Aug 6, 2020

Codecov Report

Merging #1504 into master will increase coverage by 0.27%.
The diff coverage is 97.56%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1504      +/-   ##
==========================================
+ Coverage   81.40%   81.67%   +0.27%     
==========================================
  Files          27       28       +1     
  Lines        2398     2467      +69     
  Branches      370      382      +12     
==========================================
+ Hits         1952     2015      +63     
- Misses        355      359       +4     
- Partials       91       93       +2     
Impacted Files Coverage Δ
locust/main.py 20.00% <0.00%> (+1.33%) ⬆️
locust/argument_parser.py 76.99% <100.00%> (+0.84%) ⬆️
locust/stats.py 89.03% <100.00%> (+0.07%) ⬆️
locust/web.py 90.00% <100.00%> (-1.49%) ⬇️
locust/user/users.py 95.83% <0.00%> (-2.78%) ⬇️
locust/__init__.py 100.00% <0.00%> (ø)
locust/shape.py 80.00% <0.00%> (ø)
locust/env.py 96.72% <0.00%> (+0.16%) ⬆️
... and 2 more

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 4833395...65752e2. Read the comment docs.

@lhupfeldt lhupfeldt mentioned this pull request Aug 16, 2020
@lhupfeldt
Copy link
Contributor Author

Hoping for some feedback on this:)

self.assertIn("Custom string arg", stdout)

def test_csv_full_history_requires_csv(self):
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is one of the few times you'll hear me saying it, but I think this is a test we dont actually need :)

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 can remove it, but I don't see why you would not like to test handling of invalid parameter combinations? You are never going to get full coverage either if you do not test this.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Strict coverage metrics dont really say a lot. But leave it in if you like, I guess it doesnt hurt

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It does not say anything about the functionality (requirements correctness), but I disagree that it does not say as lot. It says a lot about the general code quality. If you have tested the functionality, then what does all the uncovered code do?
But let's close that discussion as it is a little off topic :)

def test_request_stats_full_history_csv(self):
self.stats.log_request("GET", "/test2", 120, 5612)
response = requests.get("http://127.0.0.1:%i/stats/requests_full_history/csv" % self.web_port)
self.assertEqual(200, response.status_code)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Maybe validate the actual content of the response as well?

Copy link
Contributor Author

@lhupfeldt lhupfeldt Aug 16, 2020

Choose a reason for hiding this comment

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

Sure, I can add that - it will be somewhat duplicating test_csv_stats_writer_full_history - but some duplication in tests are not a bad thing.
I can test for the header or for header and data - if testing for data I need to wait until data is present.

Copy link
Collaborator

@cyberw cyberw Aug 16, 2020

Choose a reason for hiding this comment

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

if it takes a long time to test data and you do it somewhere else then maybe it is not necessary (but it would be nice)

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'll look into it tonight.

@cyberw
Copy link
Collaborator

cyberw commented Aug 18, 2020

I'm getting close to making a new release. If you want your stuff in there, I need your last tweaks :)

Also check headers in existing csv download tests.
@cyberw
Copy link
Collaborator

cyberw commented Aug 18, 2020

I saw that the build was failing on a strange error (timeout) so I retriggered it, after which it succeeded. I'll run it a couple of times to make sure it has not become unstable.

@cyberw
Copy link
Collaborator

cyberw commented Aug 18, 2020

Looks good. Thanks for your patience :)

@cyberw cyberw merged commit 12bfb26 into locustio:master Aug 18, 2020
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