1
0
mirror of https://github.com/golang/go synced 2024-11-18 01:34:44 -07:00

runtime/metrics: mark histogram metrics as cumulative

All the current histogram metrics accumulate counts from program start
to infinity, and can be reasonably used to compute rates (also to
generate windowed distributions).

Change-Id: I5196c59867de34fba41bb8552606fa315460cef9
Reviewed-on: https://go-review.googlesource.com/c/go/+/282633
Run-TryBot: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Trust: Michael Knyszek <mknyszek@google.com>
Reviewed-by: Michael Pratt <mpratt@google.com>
Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
Michael Anthony Knyszek 2021-01-08 17:12:50 +00:00 committed by Michael Knyszek
parent 8f6a9acbb3
commit 6250833911

View File

@ -73,11 +73,13 @@ var allDesc = []Description{
Name: "/gc/heap/allocs-by-size:bytes", Name: "/gc/heap/allocs-by-size:bytes",
Description: "Distribution of all objects allocated by approximate size.", Description: "Distribution of all objects allocated by approximate size.",
Kind: KindFloat64Histogram, Kind: KindFloat64Histogram,
Cumulative: true,
}, },
{ {
Name: "/gc/heap/frees-by-size:bytes", Name: "/gc/heap/frees-by-size:bytes",
Description: "Distribution of all objects freed by approximate size.", Description: "Distribution of all objects freed by approximate size.",
Kind: KindFloat64Histogram, Kind: KindFloat64Histogram,
Cumulative: true,
}, },
{ {
Name: "/gc/heap/goal:bytes", Name: "/gc/heap/goal:bytes",
@ -93,6 +95,7 @@ var allDesc = []Description{
Name: "/gc/pauses:seconds", Name: "/gc/pauses:seconds",
Description: "Distribution individual GC-related stop-the-world pause latencies.", Description: "Distribution individual GC-related stop-the-world pause latencies.",
Kind: KindFloat64Histogram, Kind: KindFloat64Histogram,
Cumulative: true,
}, },
{ {
Name: "/memory/classes/heap/free:bytes", Name: "/memory/classes/heap/free:bytes",