]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/metrics: set /sched/latencies:seconds as cumulative
authorNayef Ghattas <nayef.ghattas@datadoghq.com>
Wed, 12 Apr 2023 09:09:01 +0000 (11:09 +0200)
committerMichael Knyszek <mknyszek@google.com>
Mon, 24 Apr 2023 14:10:02 +0000 (14:10 +0000)
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>
src/runtime/metrics/description.go

index 9f486d1367b90381833ccd2db78dcfff02ee9eec..0168ee912cb62eaa5f84124b1e845e3b1258bb3a 100644 (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",