Skip to content

fix: telemetry for power util not collected when turbostat output doesn't include Package field, e.g., single socket + UMA#690

Merged
harp-intel merged 1 commit intomainfrom
fix-turbostat-parse-no-package
Apr 23, 2026
Merged

fix: telemetry for power util not collected when turbostat output doesn't include Package field, e.g., single socket + UMA#690
harp-intel merged 1 commit intomainfrom
fix-turbostat-parse-no-package

Conversation

@harp-intel
Copy link
Copy Markdown
Contributor

@harp-intel harp-intel commented Apr 22, 2026

This pull request improves the logic for extracting package rows from turbostat output, especially for cases where the "Package" field is missing, and adds corresponding test coverage to ensure correctness.

Enhancements to package row extraction:

  • Updated the extractPackageRows function in turbostat.go to handle cases where the "Package" field is absent. The new logic identifies package rows by checking for Core == "0" and, as an additional safeguard, only includes rows where CPU == "0". This ensures robust extraction across different turbostat output formats.

Test coverage improvements:

  • Added a new test case and sample output (turbostatOutputNoPackage) in turbostat_test.go to verify that package rows are correctly identified even when the "Package" field is missing. The test checks that the extraction logic returns the correct rows and length. [1] [2]

Co-authored-by: Copilot copilot@github.com Signed-off-by: Harper, Jason M jason.m.harper@intel.com

…sn't include Package field, e.g., single socket + UMA

Co-authored-by: Copilot <copilot@github.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit 5fe52ad into main Apr 23, 2026
5 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.

1 participant