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 CPU usage plugin #437

Merged

Conversation

BakhtinArtem
Copy link

Based on the request in post #238, I added a plugin that exports CPU metrics. Unfortunately, I ran into a problem with inconsistent measurements. The OperatingSystemMXBean module, which is used to gather the metrics, can return NaN values if the CPU load cannot be read at that moment. This produces a 0 values in the measurement results.

Also, not all devices provide the OperatingSystemMXBean subinterface of the com.sun.management package, so some metrics are not available in some OSes.

@lbulej lbulej self-assigned this Mar 8, 2024
@lbulej lbulej changed the title add cpu usage plugin resolves #238 Add CPU usage plugin Apr 24, 2024
@lbulej lbulej self-requested a review April 24, 2024 08:20
@lbulej lbulej changed the base branch from master to plugin/jmx-cpu May 14, 2024 09:33
@lbulej
Copy link
Member

lbulej commented May 14, 2024

I'll merge this into a separate branch for now, I want to check if it's better to report negative numbers or null in the JSON instead of 0 to represent the NaN that could be returned by the getSystemLoadAverage() method.

@lbulej lbulej merged commit 73302d2 into renaissance-benchmarks:plugin/jmx-cpu May 14, 2024
13 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