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: bugfix for cpu sampler #29

Merged
merged 1 commit into from
Jul 25, 2023
Merged

fix: bugfix for cpu sampler #29

merged 1 commit into from
Jul 25, 2023

Conversation

brayniac
Copy link
Contributor

When we use the proc_cpuinfo sampler on systems that do not report a per processor frequency, the sampler will panic with a divide by zero.

This change fixes the logic so that we avoid a divide by zero when /proc/cpuinfo doesn't parse as we expect. It also changes the logic on how we count the number of online cores to get a count even when the system doesn't report core frequencies.

When we use the proc_cpuinfo sampler on systems that do not report
a per processor frequency, the sampler will panic with a divide by
zero.

This change fixes the logic so that we avoid a divide by zero when
/proc/cpuinfo doesn't parse as we expect. It also changes the logic
on how we count the number of online cores to get a count even when
the system doesn't report core frequencies.
@brayniac brayniac merged commit 58eadac into iopsystems:main Jul 25, 2023
15 checks passed
@brayniac brayniac deleted the fix branch July 25, 2023 16:33
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.

1 participant