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

Add friendlier message about expected limit #1566

Merged
merged 3 commits into from
Sep 18, 2020

Conversation

parberge
Copy link
Contributor

Will now print something like this to standard out:

[2020-09-17 09:39:33,411] 7131dd94fc3b/WARNING/locust.main: System open file limit '2048' is below recommended setting '10000'. It's not high enough for load testing, and the OS didn't allow locust to increase it by itself. See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-number-of-open-files-limit for more info.

Since the expected setting isn't documented without this message it's
hard to know what the recommended value is.

Will now print something like this to standard out:

```
[2020-09-17 09:39:33,411] 7131dd94fc3b/WARNING/locust.main: System open file limit '2048' is below recommended setting '10000'. It's not high enough for load testing, and the OS didn't allow locust to increase it by itself. See https://github.com/locustio/locust/wiki/Installation#increasing-maximum-number-of-open-files-limit for more info.
```

Since the expected setting isn't documented without this message it's
hard to know what the recommended value is.
@codecov
Copy link

codecov bot commented Sep 17, 2020

Codecov Report

Merging #1566 into master will increase coverage by 0.69%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1566      +/-   ##
==========================================
+ Coverage   81.38%   82.07%   +0.69%     
==========================================
  Files          28       28              
  Lines        2557     2572      +15     
  Branches      392      392              
==========================================
+ Hits         2081     2111      +30     
+ Misses        381      368      -13     
+ Partials       95       93       -2     
Impacted Files Coverage Δ
locust/main.py 20.08% <0.00%> (-0.18%) ⬇️
locust/clients.py 90.19% <0.00%> (-4.91%) ⬇️
locust/argument_parser.py 77.19% <0.00%> (-0.69%) ⬇️
locust/stats.py 90.08% <0.00%> (+0.06%) ⬆️
locust/user/task.py 96.21% <0.00%> (+0.56%) ⬆️
locust/runners.py 83.86% <0.00%> (+4.43%) ⬆️

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 ec562ae...b96a657. Read the comment docs.

@cyberw
Copy link
Collaborator

cyberw commented Sep 17, 2020

The recommended limit is actually "as high as possible". The reason I chose 10000 is because that is the highest we can automatically increase it to on macOS. Not sure what would be the best way to describe it...

@cyberw
Copy link
Collaborator

cyberw commented Sep 17, 2020

Overall I prefer a short log entry but maybe some more details in the wiki entry.

@parberge
Copy link
Contributor Author

@cyberw Ok, so what action should I take? I'm not against any of the suggestions, but I'm not sure what you want me to do with this PR.

@cyberw
Copy link
Collaborator

cyberw commented Sep 18, 2020

I guess if you just change the word ”recommended” to ”minimum” that is good enough for me to merge.

@cyberw
Copy link
Collaborator

cyberw commented Sep 18, 2020

Dont forget to format using Black :) (if you can configure your editor to automatically do that, then feel free to add that config to the repo, like it is for VS Code at the moment)

@parberge
Copy link
Contributor Author

@cyberw I do have black with vscode. So my changes are formatted with black.

However I chose not to include the formatting changes that had nothing to do with my changes to make it clear.
I can include those if you really want

@parberge
Copy link
Contributor Author

Oh you have that as a step in CI. I see.
I'll include those changes as well then.

@cyberw cyberw merged commit 36ff2fc into locustio:master Sep 18, 2020
@cyberw
Copy link
Collaborator

cyberw commented Sep 18, 2020

thanks!

@parberge parberge deleted the better_warning_message branch September 18, 2020 13:41
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