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

Adding more debug logging for runners.py #1570

Merged
merged 1 commit into from
Sep 28, 2020
Merged

Adding more debug logging for runners.py #1570

merged 1 commit into from
Sep 28, 2020

Conversation

max-rocket-internet
Copy link
Contributor

It's almost impossible to investigate issues like #1535 and some of my previous issues without making custom local changes to add more logging, which is annoying and time consuming.

So here I'm adding some more debug log messages and add a function for updating the state, with a debug log message.

@codecov
Copy link

codecov bot commented Sep 28, 2020

Codecov Report

Merging #1570 into master will decrease coverage by 0.48%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1570      +/-   ##
==========================================
- Coverage   82.20%   81.72%   -0.49%     
==========================================
  Files          28       28              
  Lines        2574     2583       +9     
  Branches      393      393              
==========================================
- Hits         2116     2111       -5     
- Misses        365      374       +9     
- Partials       93       98       +5     
Impacted Files Coverage Δ
locust/runners.py 82.84% <100.00%> (-1.03%) ⬇️
locust/clients.py 90.19% <0.00%> (-4.91%) ⬇️
locust/contrib/fasthttp.py 85.37% <0.00%> (-0.95%) ⬇️
locust/user/task.py 94.65% <0.00%> (-0.54%) ⬇️
locust/stats.py 90.28% <0.00%> (+0.20%) ⬆️

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 9c8c73c...41fd0ea. Read the comment docs.

@cyberw
Copy link
Collaborator

cyberw commented Sep 28, 2020

lgtm.

@cyberw cyberw merged commit b423520 into locustio:master Sep 28, 2020

def stop(self):
if self.state not in [STATE_INIT, STATE_STOPPED, STATE_STOPPING]:
self.state = STATE_STOPPING
logger.debug("Stopping...")
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh, but I think this line is no longer needed. you can remove it as part of the actual fix later on :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Why is it not needed?

Copy link
Collaborator

@cyberw cyberw Sep 28, 2020

Choose a reason for hiding this comment

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

Because we’re also going to be logging ”Updating state to STATE_STOPPING, old state was X” right after that.

(I was thinking you wrote that line before you implemented update_state, but maybe I was mistaken)

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