mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime/metrics: add /gc/scan/globals:bytes
For #56857 Change-Id: I748fd2a33ee76d9a83ea42f2ebf6d9edda243301 Reviewed-on: https://go-review.googlesource.com/c/go/+/497320 Run-TryBot: Felix Geisendörfer <felix.geisendoerfer@datadoghq.com> Reviewed-by: David Chase <drchase@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Auto-Submit: Michael Knyszek <mknyszek@google.com> TryBot-Result: Gopher Robot <gobot@golang.org>
This commit is contained in:
parent
8b51eb5199
commit
a63afe4720
3 changed files with 14 additions and 0 deletions
|
|
@ -189,6 +189,12 @@ func initMetrics() {
|
|||
out.scalar = in.sysStats.gcCyclesDone
|
||||
},
|
||||
},
|
||||
"/gc/scan/globals:bytes": {
|
||||
compute: func(in *statAggregate, out *metricValue) {
|
||||
out.kind = metricKindUint64
|
||||
out.scalar = gcController.globalsScan.Load()
|
||||
},
|
||||
},
|
||||
"/gc/heap/allocs-by-size:bytes": {
|
||||
deps: makeStatDepSet(heapStatsDep),
|
||||
compute: func(in *statAggregate, out *metricValue) {
|
||||
|
|
|
|||
|
|
@ -294,6 +294,11 @@ var allDesc = []Description{
|
|||
Kind: KindFloat64Histogram,
|
||||
Cumulative: true,
|
||||
},
|
||||
{
|
||||
Name: "/gc/scan/globals:bytes",
|
||||
Description: "The total amount of global variable space that is scannable.",
|
||||
Kind: KindUint64,
|
||||
},
|
||||
{
|
||||
Name: "/gc/scan/stack:bytes",
|
||||
Description: "The number of bytes of stack that were scanned last GC cycle.",
|
||||
|
|
|
|||
|
|
@ -216,6 +216,9 @@ Below is the full list of supported metrics, ordered lexicographically.
|
|||
Distribution of individual GC-related stop-the-world pause
|
||||
latencies. Bucket counts increase monotonically.
|
||||
|
||||
/gc/scan/globals:bytes
|
||||
The total amount of global variable space that is scannable.
|
||||
|
||||
/gc/scan/stack:bytes
|
||||
The number of bytes of stack that were scanned last GC cycle.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue