mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime/metrics: change unit on *-by-size metrics to match bucket unit
This change modifies the *-by-size metrics' units to be based off the bucket's unit (bytes) as opposed to the unit of the counts (objects). This convention is more in-line with distributions in other metrics systems. Change-Id: Id3b68a09f52f0e1ff9f4346f613ae1cbd9f52f73 Reviewed-on: https://go-review.googlesource.com/c/go/+/282352 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Austin Clements <austin@google.com> Reviewed-by: Michael Pratt <mpratt@google.com> Trust: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
c6513bca5a
commit
32afcc9436
4 changed files with 15 additions and 10 deletions
|
|
@ -86,7 +86,7 @@ func initMetrics() {
|
|||
out.scalar = in.sysStats.gcCyclesDone
|
||||
},
|
||||
},
|
||||
"/gc/heap/allocs-by-size:objects": {
|
||||
"/gc/heap/allocs-by-size:bytes": {
|
||||
deps: makeStatDepSet(heapStatsDep),
|
||||
compute: func(in *statAggregate, out *metricValue) {
|
||||
hist := out.float64HistOrInit(sizeClassBuckets)
|
||||
|
|
@ -98,7 +98,7 @@ func initMetrics() {
|
|||
}
|
||||
},
|
||||
},
|
||||
"/gc/heap/frees-by-size:objects": {
|
||||
"/gc/heap/frees-by-size:bytes": {
|
||||
deps: makeStatDepSet(heapStatsDep),
|
||||
compute: func(in *statAggregate, out *metricValue) {
|
||||
hist := out.float64HistOrInit(sizeClassBuckets)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue