mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime/metrics: add gomaxprocs metric
For #47216. Change-Id: Ib2d48c4583570a2dae9510a52d4c6ffc20161b31 Reviewed-on: https://go-review.googlesource.com/c/go/+/404305 Reviewed-by: David Chase <drchase@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
0f715f1ac9
commit
ece6ac4d4d
4 changed files with 20 additions and 0 deletions
|
|
@ -280,6 +280,12 @@ func initMetrics() {
|
|||
in.sysStats.gcMiscSys + in.sysStats.otherSys
|
||||
},
|
||||
},
|
||||
"/sched/gomaxprocs:threads": {
|
||||
compute: func(_ *statAggregate, out *metricValue) {
|
||||
out.kind = metricKindUint64
|
||||
out.scalar = uint64(gomaxprocs)
|
||||
},
|
||||
},
|
||||
"/sched/goroutines:goroutines": {
|
||||
compute: func(_ *statAggregate, out *metricValue) {
|
||||
out.kind = metricKindUint64
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue