For #37112.
Change-Id: I994dfe848605b95ef6aec24f53869e929247e987
Reviewed-on: https://go-review.googlesource.com/c/go/+/247049
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>
in.sysStats.gcMiscSys + in.sysStats.otherSys
},
},
+ "/sched/goroutines:goroutines": {
+ compute: func(_ *statAggregate, out *metricValue) {
+ out.kind = metricKindUint64
+ out.scalar = uint64(gcount())
+ },
+ },
}
metricsInit = true
}
Description: "All memory mapped by the Go runtime into the current process as read-write. Note that this does not include memory mapped by code called via cgo or via the syscall package. Sum of all metrics in /memory/classes.",
Kind: KindUint64,
},
+ {
+ Name: "/sched/goroutines:goroutines",
+ Description: "Count of live goroutines.",
+ Kind: KindUint64,
+ },
}
// All returns a slice of containing metric descriptions for all supported metrics.
as read-write. Note that this does not include memory mapped
by code called via cgo or via the syscall package.
Sum of all metrics in /memory/classes.
+
+ /sched/goroutines:goroutines
+ Count of live goroutines.
*/
package metrics
for i := range h.Counts {
gc.pauses += h.Counts[i]
}
+ case "/sched/goroutines:goroutines":
+ if samples[i].Value.Uint64() < 1 {
+ t.Error("number of goroutines is less than one")
+ }
}
}
if totalVirtual.got != totalVirtual.want {