feat: fix metric classes and add default-aggregation to all metrics - #64
Conversation
mpstat/pidstat Busy-CPU and NonBusy-CPU: throughput -> percentage (these are 0-1 CPU utilization fractions, not throughput rates). iostat percent-utilization: throughput -> percentage. iostat percent-merged: count -> percentage. iostat avg-service-time-ms: count -> latency. Add explicit default-aggregation to all metric descriptors: sum for throughput rates, avg for percentages/latency/counts. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
atheurer
left a comment
There was a problem hiding this comment.
Approving per team decision, but flagging the concern found during review: default-aggregation is written directly into the metric_desc document, but CommonDataModel's metric_desc index mapping is dynamic: strict and only declares class/type/source/names-list/names — an aggregation field (aggregation-method, a different name) is called out in cdm.js as planned for a future schema version but not yet enabled. This could cause metric_desc writes to be rejected by OpenSearch under strict mapping.
This same field is being added in parallel by several other PRs (tool-dpdk#9, bench-fio#67, bench-pytorch#15, bench-hwlatdetect#16, bench-hwnoise#21, bench-oslat#89, bench-osnoise#18, bench-timerlat#14) — recommend verifying CDM schema support once, centrally, before any of these land in production, rather than per-repo.
Also noting the new percentage/latency class values used here are novel relative to other tool-* repos (which mostly use throughput/count/logging/pass) — worth confirming CDM's aggregation logic actually branches on these values.
|
Correction to my earlier approval comment: I checked upstream CommonDataModel and |
Summary
class=throughputtoclass=percentage— these are 0-1 CPU utilization fractions, not throughput ratespercent-utilizationfromclass=throughputtoclass=percentagepercent-mergedfromclass=counttoclass=percentageavg-service-time-msfromclass=counttoclass=latencydefault-aggregationto all metric descriptors:sumfor throughput rates,avgfor percentages/latency/countsPart of PERFNFV-421 / epic PERFNFV-409
Test plan
default-aggregationin metric_desc documents🤖 Generated with Claude Code