mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime,runtime/metrics: add heap object count metric
For #37112. Change-Id: Idd3dd5c84215ddd1ab05c2e76e848aa0a4d40fb0 Reviewed-on: https://go-review.googlesource.com/c/go/+/247043 Run-TryBot: Michael Knyszek <mknyszek@google.com> TryBot-Result: Go Bot <gobot@golang.org> Trust: Michael Knyszek <mknyszek@google.com> Reviewed-by: Michael Pratt <mpratt@google.com>
This commit is contained in:
parent
74e566ed1d
commit
07c3f65d53
4 changed files with 26 additions and 2 deletions
|
|
@ -70,6 +70,8 @@ func TestReadMetrics(t *testing.T) {
|
|||
checkUint64(t, name, samples[i].Value.Uint64(), mstats.BuckHashSys)
|
||||
case "/memory/classes/total:bytes":
|
||||
checkUint64(t, name, samples[i].Value.Uint64(), mstats.Sys)
|
||||
case "/gc/heap/objects:objects":
|
||||
checkUint64(t, name, samples[i].Value.Uint64(), mstats.HeapObjects)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue