mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime/metrics: add the number of Go-to-C calls
For #47216. Change-Id: I1c2cd518e6ff510cc3ac8d8f72fd52eadcabc16c Reviewed-on: https://go-review.googlesource.com/c/go/+/404306 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: David Chase <drchase@google.com> Run-TryBot: Michael Knyszek <mknyszek@google.com>
This commit is contained in:
parent
364ced6255
commit
9bd6e2776f
4 changed files with 17 additions and 0 deletions
|
|
@ -65,6 +65,12 @@ func initMetrics() {
|
|||
|
||||
timeHistBuckets = timeHistogramMetricsBuckets()
|
||||
metrics = map[string]metricData{
|
||||
"/cgo/go-to-c-calls:calls": {
|
||||
compute: func(_ *statAggregate, out *metricValue) {
|
||||
out.kind = metricKindUint64
|
||||
out.scalar = uint64(NumCgoCall())
|
||||
},
|
||||
},
|
||||
"/gc/cycles/automatic:gc-cycles": {
|
||||
deps: makeStatDepSet(sysStatsDep),
|
||||
compute: func(in *statAggregate, out *metricValue) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue