prysm-pulse/shared/debug/maxprocs_metric.go

18 lines
340 B
Go
Raw Normal View History

2019-06-07 19:43:22 +00:00
package debug
import (
"runtime"
"github.com/prometheus/client_golang/prometheus"
"github.com/prometheus/client_golang/prometheus/promauto"
)
var (
_ = promauto.NewGaugeFunc(prometheus.GaugeOpts{
2019-06-07 19:43:22 +00:00
Name: "go_maxprocs",
Help: "The result of runtime.GOMAXPROCS(0)",
}, func() float64 {
return float64(runtime.GOMAXPROCS(0))
})
)