Skip to content

fix: use throughput class and sum aggregation for CPU metrics - #67

Merged
k-rister merged 1 commit into
masterfrom
fix-cpu-metric-descriptor-semantics
Aug 7, 2026
Merged

fix: use throughput class and sum aggregation for CPU metrics#67
k-rister merged 1 commit into
masterfrom
fix-cpu-metric-descriptor-semantics

Conversation

@k-rister

@k-rister k-rister commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Changed mpstat and pidstat Busy-CPU/NonBusy-CPU metric descriptors from class: "percentage" / default-aggregation: "avg" to class: "throughput" / default-aggregation: "sum"
  • The CPU type fields (usr, sys, soft, irq, etc.) are mutually exclusive time slices that must be summed when aggregating across the type breakout — avg produced incorrect results (e.g. 24.8% for a 99.3% busy CPU)
  • Class changed to throughput because post-aggregation across multiple CPUs the value can exceed 100%

Closes #65
Closes #66

Test plan

  • Run a benchmark with sysstat tool enabled
  • Query mpstat::Busy-CPU with breakout by hostname + CPU num (no type) — verify the value matches the sum of individual types
  • Query pidstat::Busy-CPU similarly — verify correct aggregation

🤖 Generated with Claude Code

@k-rister k-rister self-assigned this Aug 6, 2026
@k-rister
k-rister requested a review from a team August 6, 2026 14:50
@project-crucible-tracking project-crucible-tracking Bot moved this to In Progress in Crucible Tracking Aug 6, 2026
mpstat and pidstat Busy-CPU/NonBusy-CPU metrics used class "percentage"
with default-aggregation "avg". The CPU type fields (usr, sys, soft,
irq, etc.) are mutually exclusive time slices that must be summed, not
averaged, when aggregating across the type breakout. This caused CDM
queries to report e.g. 24.8% for a CPU that was 99.3% busy.

Change both to class "throughput" with default-aggregation "sum". The
class change is also correct because post-aggregation across multiple
CPUs the value can exceed 100%.

Closes #65
Closes #66

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@k-rister
k-rister force-pushed the fix-cpu-metric-descriptor-semantics branch from e84c361 to df4d5c0 Compare August 7, 2026 13:14
@k-rister
k-rister merged commit 861ba26 into master Aug 7, 2026
37 checks passed
@k-rister
k-rister deleted the fix-cpu-metric-descriptor-semantics branch August 7, 2026 15:46
@github-project-automation github-project-automation Bot moved this from In Progress to Done in Crucible Tracking Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

2 participants