1
0
mirror of https://github.com/golang/go synced 2024-11-22 23:50:03 -07:00

runtime/metrics: set /sched/latencies:seconds as cumulative

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 <gobot@golang.org>
Run-TryBot: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
Nayef Ghattas 2023-04-12 11:09:01 +02:00 committed by Michael Knyszek
parent 21c2fdd91c
commit c2c787d73e

View File

@ -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",