github.com/prysmaticlabs/prysm@v1.4.4/shared/debug/maxprocs_metric.go (about)

     1  package debug
     2  
     3  import (
     4  	"runtime"
     5  
     6  	"github.com/prometheus/client_golang/prometheus"
     7  	"github.com/prometheus/client_golang/prometheus/promauto"
     8  )
     9  
    10  var (
    11  	_ = promauto.NewGaugeFunc(prometheus.GaugeOpts{
    12  		Name: "go_maxprocs",
    13  		Help: "The result of runtime.GOMAXPROCS(0)",
    14  	}, func() float64 {
    15  		return float64(runtime.GOMAXPROCS(0))
    16  	})
    17  )