Skip to content

Conversation

@harp-intel
Copy link
Contributor

This PR fixes an issue with the 'metrics trim' command by including a slimmed-down set of perf-supported events in the metadata that is written into the HTML report. By including the perf-supported events in the metadata (in the HTML report), the trim command can follow the same logic used to collect the events.

This pull request updates how supported performance events are extracted and simplifies metadata handling in the metrics codebase. The most important changes are grouped below:

Performance Event Extraction:

  • The perf supported events script in getMetadataScripts was updated to run perf list --json and use an awk script to extract only hardware events and events starting with cstate_ or power, improving the accuracy and relevance of collected events.

Metadata Handling Simplification:

  • The code that previously used regular expressions to remove PerfSupportedEvents and SystemSummaryFields from the JSON metadata in MetricGroup.loadHTMLTemplateValues was removed. Now, the full metadata is passed through without modification, simplifying the logic.
  • The unused regexp import was removed from cmd/metrics/summary.go as a result of the above simplification.

…vents

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
…vents

Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
Signed-off-by: Harper, Jason M <jason.m.harper@intel.com>
@harp-intel harp-intel merged commit f25bdd7 into main Dec 12, 2025
5 checks passed
@harp-intel harp-intel deleted the trimotherevents branch December 12, 2025 18: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.

2 participants