Skip to content

Metric metadata extend comparison dict#429

Merged
olichtne merged 3 commits intoLNST-project:masterfrom
Axonis:metric_metadata_extend
Mar 17, 2026
Merged

Metric metadata extend comparison dict#429
olichtne merged 3 commits intoLNST-project:masterfrom
Axonis:metric_metadata_extend

Conversation

@Axonis
Copy link
Contributor

@Axonis Axonis commented Mar 13, 2026

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: #

@Axonis Axonis force-pushed the metric_metadata_extend branch from 76d2e59 to b8f5fe7 Compare March 13, 2026 10:11
Copy link
Collaborator

@olichtne olichtne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Axonis added 3 commits March 17, 2026 13:01
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.
@Axonis Axonis force-pushed the metric_metadata_extend branch from b8f5fe7 to b51d430 Compare March 17, 2026 12:04
@olichtne olichtne merged commit b61dff5 into LNST-project:master Mar 17, 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.

2 participants