Add parsing for perf list JSON output to extract hardware and power events #586
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
perf supported eventsscript ingetMetadataScriptswas updated to runperf list --jsonand use anawkscript to extract only hardware events and events starting withcstate_orpower, improving the accuracy and relevance of collected events.Metadata Handling Simplification:
PerfSupportedEventsandSystemSummaryFieldsfrom the JSON metadata inMetricGroup.loadHTMLTemplateValueswas removed. Now, the full metadata is passed through without modification, simplifying the logic.regexpimport was removed fromcmd/metrics/summary.goas a result of the above simplification.