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:
Michael Anthony Knyszek 2022-05-05 16:54:44 +00:00 committed by Michael Knyszek
parent 364ced6255
commit 9bd6e2776f
4 changed files with 17 additions and 0 deletions

View file

@ -51,6 +51,12 @@ type Description struct {
// The English language descriptions below must be kept in sync with the
// descriptions of each metric in doc.go.
var allDesc = []Description{
{
Name: "/cgo/go-to-c-calls:calls",
Description: "Count of calls made from Go to C by the current process.",
Kind: KindUint64,
Cumulative: true,
},
{
Name: "/gc/cycles/automatic:gc-cycles",
Description: "Count of completed GC cycles generated by the Go runtime.",