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

Don't log state change if it's the same #1580

Merged
merged 4 commits into from
Sep 30, 2020
Merged

Don't log state change if it's the same #1580

merged 4 commits into from
Sep 30, 2020

Conversation

max-rocket-internet
Copy link
Contributor

Resolves #1577

@codecov
Copy link

codecov bot commented Sep 30, 2020

Codecov Report

Merging #1580 into master will increase coverage by 0.19%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1580      +/-   ##
==========================================
+ Coverage   81.37%   81.57%   +0.19%     
==========================================
  Files          28       28              
  Lines        2583     2583              
  Branches      393      393              
==========================================
+ Hits         2102     2107       +5     
+ Misses        384      379       -5     
  Partials       97       97              
Impacted Files Coverage Δ
locust/runners.py 81.54% <100.00%> (+0.36%) ⬆️
locust/stats.py 89.87% <0.00%> (-0.41%) ⬇️
locust/clients.py 95.09% <0.00%> (+4.90%) ⬆️

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 bfd98b1...5e4b1b7. Read the comment docs.

@cyberw
Copy link
Collaborator

cyberw commented Sep 30, 2020

Are you sure there is not an underlying issue? I dont see why we should make tons of state changes to the same state...

@max-rocket-internet
Copy link
Contributor Author

True. I can find out why something is continually updating the state to the same value.

@max-rocket-internet
Copy link
Contributor Author

It's from here: https://github.com/locustio/locust/blob/master/locust/runners.py#L624

I will test a different fix then 🙂

@cyberw
Copy link
Collaborator

cyberw commented Sep 30, 2020

Nice! maybe just add and not self.state == STATE_STOPPED to that if statement...

@max-rocket-internet
Copy link
Contributor Author

OK done that now some test is failing. I will look into it.

@cyberw cyberw merged commit 8ef212d into locustio:master Sep 30, 2020
@max-rocket-internet max-rocket-internet deleted the debug_log_fix branch September 30, 2020 08:53
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.

After starting and then stopping a load test, master is updating state in a loop
2 participants