-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
feat(inputs.intel_powerstat): Extract business logic to external library #14363
Conversation
4c25667
to
0cae3e9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for your contribution and the nice cleanup of this plugin @ggalieroc! I do have some comments...
Thank you for your review comments!. I have replied to them. Please allow me some time to add fixes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great improvements, only minor comments..
Download PR build artifacts for linux_amd64.tar.gz, darwin_amd64.tar.gz, and windows_amd64.zip. 📦 Click here to get additional PR build artifactsArtifact URLs |
Hi @srebhan, I addressed your comments, :). If you could please have a look would be great. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for all your work @ggalieroc and thanks for the valuable input @p-zak!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for putting this up.
I think we are all in agreement that in future PRs we would like to see the tests pull data from test files like we do in other plugins. I would also love to see smaller PRs ;) There is no way that any of us were able to thoroughly and confidently review 11k+ lines.
Summary
The Intel PowerStat plugin has recently expanded significantly, primarily due to the sophisticated domain logic required to read various metrics from a variety of processor models.
In order to simplify and enhance the readability of the plugin, we (Intel) have extracted most of the mentioned logic into an external (and publicly accessible) library at https://github.com/intel/powertelemetry.
We would like to add this library as a dependency and utilize it in this plugin for metric reading purposes.
This PR also introduces new features:
cpu_c0_substate_c01_percent
,cpu_c0_substate_c02_percent
andcpu_c0_substate_c0_wait_percent
added (based on kernel's perf interface, currently available only forIntel Sapphire Rapids X
andIntel Emerald Rapids X
).uncore_frequency_mhz_cur
metric is exposed viaintel-uncore-frequency
kernel module and will be read from there. For older kernels, it is still accessed viamsr
kernel module.included_cpus
andexcluded_cpus
configuration fields are introduced - to gathercpu_metric
s only from configured cpus.msr_read_timeout
configuration field added - to set the optional timeout duration for MSR reading.Checklist
Related issues
Also this PR:
uncore_frequency
metrics mentioned in Metrics missing from intel_powerstat #13098 (and implemented in docs(inputs.intel_powerstat): Add notes about hw/sw dependencies #14263)