mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: shrink time histogram buckets
There are lots of useless buckets with too much precision. Introduce a minimum level of precision with a minimum bucket bit. This cuts down on the size of a time histogram dramatically (~3x). Also, pick a smaller sub bucket count; we don't need 6% precision. Also, rename super-buckets to buckets to more closely line up with HDR histogram literature. Change-Id: I199449650e4b34f2a6dca3cf1d8edb071c6655c0 Reviewed-on: https://go-review.googlesource.com/c/go/+/427615 Run-TryBot: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
1fc83690e6
commit
87eda2a782
4 changed files with 162 additions and 131 deletions
|
|
@ -200,6 +200,7 @@ func initMetrics() {
|
|||
for i := range memstats.gcPauseDist.counts {
|
||||
hist.counts[i+1] = memstats.gcPauseDist.counts[i].Load()
|
||||
}
|
||||
hist.counts[len(hist.counts)-1] = memstats.gcPauseDist.overflow.Load()
|
||||
},
|
||||
},
|
||||
"/gc/stack/starting-size:bytes": {
|
||||
|
|
@ -330,6 +331,7 @@ func initMetrics() {
|
|||
for i := range sched.timeToRun.counts {
|
||||
hist.counts[i+1] = sched.timeToRun.counts[i].Load()
|
||||
}
|
||||
hist.counts[len(hist.counts)-1] = sched.timeToRun.overflow.Load()
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue