Skip to content

Commit

Permalink
runtime/metrics: set /sched/latencies:seconds as cumulative
Browse files Browse the repository at this point in the history
The current implementation for this metric populates a histogram
that is never reset, i.e. where each bucket count increases
monotonically.

The comment in the definition of the Cumulative attribute calls
out that cumulative means that if the metric is a distribution,
then each bucket count increases monotonically.

In that sense, the cumulative attribute should be set to true for
this metric.

Change-Id: Ifc34e965a62f2d7881b5c8e8cbb8b7207a4d5757
Reviewed-on: https://go-review.googlesource.com/c/go/+/486755
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Felix Geisendörfer <[email protected]>
Reviewed-by: Michael Knyszek <[email protected]>
Reviewed-by: Felix Geisendörfer <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
  • Loading branch information
Gandem authored and mknyszek committed Apr 24, 2023
1 parent 21c2fdd commit c2c787d
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/metrics/description.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,6 +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.",
Kind: KindFloat64Histogram,
Cumulative: true,
},
{
Name: "/sync/mutex/wait/total:seconds",
Expand Down

0 comments on commit c2c787d

Please sign in to comment.