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

Allow None response time for requests #1088

Merged
merged 4 commits into from
Oct 24, 2019
Merged

Allow None response time for requests #1088

merged 4 commits into from
Oct 24, 2019

Conversation

cyberw
Copy link
Collaborator

@cyberw cyberw commented Sep 22, 2019

fixes #1087

@codecov
Copy link

codecov bot commented Oct 18, 2019

Codecov Report

Merging #1088 into master will increase coverage by 1.39%.
The diff coverage is 91.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1088      +/-   ##
==========================================
+ Coverage   72.69%   74.08%   +1.39%     
==========================================
  Files          18       18              
  Lines        1765     1779      +14     
  Branches      262      263       +1     
==========================================
+ Hits         1283     1318      +35     
+ Misses        420      399      -21     
  Partials       62       62
Impacted Files Coverage Δ
locust/stats.py 82.04% <91.66%> (+0.45%) ⬆️
locust/web.py 81.96% <0%> (+0.61%) ⬆️
locust/core.py 86.16% <0%> (+0.89%) ⬆️
locust/runners.py 59.49% <0%> (+5.3%) ⬆️

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 24e0a8e...29e4ade. Read the comment docs.

@@ -159,6 +159,35 @@ class MyTestLocust(Locust):
s = master.stats.get("/", "GET")
self.assertEqual(700, s.median_response_time)

def test_slave_stats_report_with_none_response_times(self):
Copy link
Member

Choose a reason for hiding this comment

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

Nice with tests that tests the whole cycle with master/slave communication!

It'd be nice to also have much simpler test in test_stats.py that just tests the None response time functionality for StatsEntry.

@cyberw cyberw added hacktoberfest See https://hacktoberfest.digitalocean.com for more info and removed hacktoberfest See https://hacktoberfest.digitalocean.com for more info labels Oct 24, 2019
@heyman heyman merged commit 6852ed5 into locustio:master Oct 24, 2019
@heyman
Copy link
Member

heyman commented Oct 24, 2019

Nice!

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.

Samples with response_time None crashes stats.py
2 participants