From: Michael Anthony Knyszek Date: Fri, 8 Jan 2021 17:12:50 +0000 (+0000) Subject: runtime/metrics: mark histogram metrics as cumulative X-Git-Tag: go1.16rc1~95 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=6250833911fc979a4ca5ba8b7f0612d054a3aeec;p=gostls13.git 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 --- 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",