Metric metadata extend comparison dict#429
Merged
olichtne merged 3 commits intoLNST-project:masterfrom Mar 17, 2026
Merged
Conversation
76d2e59 to
b8f5fe7
Compare
olichtne
reviewed
Mar 17, 2026
Collaborator
olichtne
left a comment
There was a problem hiding this comment.
looks ok, just a small comment to think about first.
additionally, can we add some explanation to the commit messages as well so that the purpose is easier to find when we git blame the specific code lines?
lnst/RecipeCommon/Perf/Measurements/Results/CPUMeasurementResults.py
Outdated
Show resolved
Hide resolved
Baseline comparison JSON output currently lacks context about which host or CPU a metric belongs to, making it impossible to distinguish e.g. CPU utilization metrics from different hosts. Add a metric_metadata property to BaseMeasurementResults that returns a per-metric dict of auxiliary metadata. The base implementation returns an empty dict, preserving existing behavior for subclasses that don't need it.
Override metric_metadata in CPUMeasurementResults to include host and CPU identification for each reported metric. This uses a per-metric nested structure so that result objects reporting multiple metrics can attach different metadata to each one.
…rison Add metric_metadata field to the MetricComparison dataclass and populate it during baseline comparison. The metadata is looked up per metric_name from the result's metric_metadata dict, so each MetricComparison carries only the metadata relevant to its specific metric.
b8f5fe7 to
b51d430
Compare
olichtne
approved these changes
Mar 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
Problem statement - Currently with the json with comparison data we are unable to tell between utilization on host1 and host2.
Solution - adding auxiliary metric_metadata variable that is empty and currently override only by the CPUMeasurementResult. This is not going to change baseline matching nor any other functionality, it's a pure addition to help tell those data apart.
Tests
TODO
Reviews
@olichtne @jtluka @enhaut
Closes: #