From c2c787d73e6fadd57ebcc9fb07532332637b9164 Mon Sep 17 00:00:00 2001 From: Nayef Ghattas Date: Wed, 12 Apr 2023 11:09:01 +0200 Subject: [PATCH] runtime/metrics: set /sched/latencies:seconds as cumulative MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The current implementation for this metric populates a histogram that is never reset, i.e. where each bucket count increases monotonically. The comment in the definition of the Cumulative attribute calls out that cumulative means that if the metric is a distribution, then each bucket count increases monotonically. In that sense, the cumulative attribute should be set to true for this metric. Change-Id: Ifc34e965a62f2d7881b5c8e8cbb8b7207a4d5757 Reviewed-on: https://go-review.googlesource.com/c/go/+/486755 TryBot-Result: Gopher Robot Run-TryBot: Felix Geisendörfer Reviewed-by: Michael Knyszek Reviewed-by: Felix Geisendörfer Reviewed-by: Michael Pratt --- src/runtime/metrics/description.go | 1 + 1 file changed, 1 insertion(+) diff --git a/src/runtime/metrics/description.go b/src/runtime/metrics/description.go index 9f486d1367..0168ee912c 100644 --- a/src/runtime/metrics/description.go +++ b/src/runtime/metrics/description.go @@ -367,6 +367,7 @@ var allDesc = []Description{ Name: "/sched/latencies:seconds", Description: "Distribution of the time goroutines have spent in the scheduler in a runnable state before actually running.", Kind: KindFloat64Histogram, + Cumulative: true, }, { Name: "/sync/mutex/wait/total:seconds", -- 2.50.0