Skip to content

Custom Distribution Summary Hi-Res#168

Merged
ecbadeaux merged 2 commits intomainfrom
ebadeaux/Hi-ResUpdate
Oct 7, 2025
Merged

Custom Distribution Summary Hi-Res#168
ecbadeaux merged 2 commits intomainfrom
ebadeaux/Hi-ResUpdate

Conversation

@brharrington
Copy link
Contributor

@brharrington brharrington commented Oct 3, 2025

These metrics were previously recorded as a distribution summary, which behaved correctly
when collected at 60-second intervals. However, when we introduced 5-second collection intervals,
internal Netflix users were upset that the max usage values were no longer representative of the
max core usage across the minute. The 5-second max values would capture brief CPU spikes that
weren't indicative of sustained core utilization over a full minute.

To address this issue, we now manually implement the internal representation of a distribution
summary by updating its constituent counter fields directly. This approach allows us to compute
the maximum average CPU usage across all cores over a 60-second window, rather than reporting
the maximum usage over individual 5-second intervals.

This pull request also removes an unnecessary read for cgroup metrics
:Everett B

static auto counterCount = registry_->CreateCounter("sys.cpu.coreUtilization", {{"statistic", "count"}});
static auto counterTotal = registry_->CreateCounter("sys.cpu.coreUtilization", {{"statistic", "totalAmount"}});
static auto counterTotalSquares = registry_->CreateCounter("sys.cpu.coreUtilization", {{"statistic", "totalOfSquares"}});
static auto gaugeMean = registry_->CreateMaxGauge("sys.cpu.coreUtilization", {{"statistic", "max"}});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

gaugeMax?

Copy link
Contributor

@ecbadeaux ecbadeaux Oct 3, 2025

Choose a reason for hiding this comment

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

Yeah I can change this. I named it gauge mean because this value really is the core with the highest max mean for its respective 12 five second intervals

@ecbadeaux ecbadeaux merged commit fc3439a into main Oct 7, 2025
2 checks passed
@ecbadeaux ecbadeaux deleted the ebadeaux/Hi-ResUpdate branch October 7, 2025 17:35
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