From 6250833911fc979a4ca5ba8b7f0612d054a3aeec Mon Sep 17 00:00:00 2001 From: Michael Anthony Knyszek Date: Fri, 8 Jan 2021 17:12:50 +0000 Subject: [PATCH] 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 TryBot-Result: Go Bot Trust: Michael Knyszek Reviewed-by: Michael Pratt Reviewed-by: Austin Clements --- src/runtime/metrics/description.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/runtime/metrics/description.go b/src/runtime/metrics/description.go index 716802e9a2..1175156104 100644 --- a/src/runtime/metrics/description.go +++ b/src/runtime/metrics/description.go @@ -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", -- 2.50.0