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

Improved cpu idle ticks calculation #1008

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

TerenceTux
Copy link

Fixes #970.

Removes the minimum of 1 idle cpu cycle, which caused a total percentage of 99% on low interval times when all cores are 100%.
When there were no changes since the last update, calc_totals and calc_idles are set to 1 to simulate an idle tick to prevent a divide by zero when calculating the percentage.

Removes the minimum of 1 idle cpu tick calculated and adds a check when there were no changes since last update.
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.

[BUG] Total CPU usage is 1% off
1 participant