runtime/metrics: specify that bucket counts increase monotonically for histogram metrics

Make it explicit in the documentation that the histogram metrics
are cumulative (i.e. each bucket count increases monotonically).

Change-Id: I89119ba816ac46a63f36e607e695fad3695057ce
Reviewed-on: https://go-review.googlesource.com/c/go/+/487315
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
Run-TryBot: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
Reviewed-by: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
Nayef Ghattas 2023-04-21 14:12:07 +02:00 committed by Michael Knyszek
parent e4b03f9425
commit 14f833f117
2 changed files with 14 additions and 9 deletions

View file

@ -196,6 +196,7 @@ var allDesc = []Description{
{
Name: "/gc/heap/allocs-by-size:bytes",
Description: "Distribution of heap allocations by approximate size. " +
"Bucket counts increase monotonically. " +
"Note that this does not include tiny objects as defined by " +
"/gc/heap/tiny/allocs:objects, only tiny blocks.",
Kind: KindFloat64Histogram,
@ -218,6 +219,7 @@ var allDesc = []Description{
{
Name: "/gc/heap/frees-by-size:bytes",
Description: "Distribution of freed heap allocations by approximate size. " +
"Bucket counts increase monotonically. " +
"Note that this does not include tiny objects as defined by " +
"/gc/heap/tiny/allocs:objects, only tiny blocks.",
Kind: KindFloat64Histogram,
@ -269,7 +271,7 @@ var allDesc = []Description{
},
{
Name: "/gc/pauses:seconds",
Description: "Distribution individual GC-related stop-the-world pause latencies.",
Description: "Distribution of individual GC-related stop-the-world pause latencies. Bucket counts increase monotonically.",
Kind: KindFloat64Histogram,
Cumulative: true,
},
@ -365,7 +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.",
Description: "Distribution of the time goroutines have spent in the scheduler in a runnable state before actually running. Bucket counts increase monotonically.",
Kind: KindFloat64Histogram,
Cumulative: true,
},