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

Report memory usage and correct CPU percentage in heartbeat messages #202

Merged
merged 3 commits into from
May 11, 2024

Conversation

skruger
Copy link

@skruger skruger commented May 2, 2024

I am picking up the work related to #165 an will be splitting it out into smaller more digestible PRs as requested.

The CPU percent change is to bring the stats in line with CPU utilization numbers as reported by tools like top. Usually CPU percentage isn't normalized by CPU count, but it is allowed to exceed 100% if it is loading across multiple cores.

@myzhan
Copy link
Owner

myzhan commented May 7, 2024

The CPU percentage is intentionally normalized by CPU count, to match the behavior of locust. Do you think we need to change this?

@skruger
Copy link
Author

skruger commented May 7, 2024

I can switch it back. If locust normalizes it by default I think that is a mistake that can lead to confusion, but that confusion may be less than the confusion that comes from diverging from normal locust behavior.

In either case I didn't make any changes to the commits I cherry picked in from the previous PR so I'm not specifically attached to the design change as long as we get things reporting good enough numbers. I'll normalize the percentage by CPU count tomorrow when I get in to work.

@myzhan
Copy link
Owner

myzhan commented May 7, 2024

Because locust can't make use of multiple cores with gevent, so the CPU percentage collected by locust won't go beyond 100% most of the time.

@skruger
Copy link
Author

skruger commented May 9, 2024

I have reverted the CPU usage change.

@myzhan myzhan merged commit 07b7994 into myzhan:master May 11, 2024
2 of 3 checks passed
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