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

Fix: cpumon doesn't reset values each iteration #194

Merged
merged 1 commit into from
Jul 21, 2021

Conversation

quantum-shift
Copy link
Collaborator

The iterating variable here:

for (auto stat : cpu_stats) stat.second = 0;
isn't a reference. Hence, the values remain unchanged and are not reset every iteration.

@quantum-shift quantum-shift added the bug Something isn't working label Jul 19, 2021
Copy link
Collaborator

@amete amete left a comment

Choose a reason for hiding this comment

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

Very good catch @quantum-shift!

@graeme-a-stewart graeme-a-stewart merged commit 91e316b into HSF:main Jul 21, 2021
quantum-shift added a commit to quantum-shift/prmon that referenced this pull request Jul 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants