]> Cypherpunks repositories - gostls13.git/commitdiff
runtime/metrics: mark histogram metrics as cumulative
authorMichael Anthony Knyszek <mknyszek@google.com>
Fri, 8 Jan 2021 17:12:50 +0000 (17:12 +0000)
committerMichael Knyszek <mknyszek@google.com>
Fri, 8 Jan 2021 18:15:53 +0000 (18:15 +0000)
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>
src/runtime/metrics/description.go

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