From 9310b54d439d4a1a8d4d337987aa63884df0af76 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Wed, 20 May 2026 11:38:19 +0300 Subject: feat: add syscall aggregate sampling infrastructure (task 17) --- internal/statsengine/histogram.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'internal/statsengine/histogram.go') diff --git a/internal/statsengine/histogram.go b/internal/statsengine/histogram.go index 4a5e3b4..27d3285 100644 --- a/internal/statsengine/histogram.go +++ b/internal/statsengine/histogram.go @@ -47,6 +47,16 @@ func (h *histogram) Increment(durationNs uint64) { h.total++ } +func (h *histogram) AddBucketCounts(counts [histogramBucketCount]uint64) { + if h == nil { + return + } + for i, count := range counts { + h.counts[i] += count + h.total += count + } +} + // Snapshot returns a HistogramSnapshot of the current histogram state. // It panics on build error, which should never happen for a valid histogram. func (h *histogram) Snapshot() HistogramSnapshot { -- cgit v1.2.3