本文整理匯總了Golang中github.com/cockroachdb/cockroach/util/metric.Registry.GaugeFloat64方法的典型用法代碼示例。如果您正苦於以下問題:Golang Registry.GaugeFloat64方法的具體用法?Golang Registry.GaugeFloat64怎麽用?Golang Registry.GaugeFloat64使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/cockroachdb/cockroach/util/metric.Registry
的用法示例。
在下文中一共展示了Registry.GaugeFloat64方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: MakeRuntimeStatSampler
// MakeRuntimeStatSampler constructs a new RuntimeStatSampler object.
func MakeRuntimeStatSampler(clock *hlc.Clock, reg *metric.Registry) RuntimeStatSampler {
return RuntimeStatSampler{
registry: reg,
clock: clock,
cgoCalls: reg.Gauge(nameCgoCalls),
goroutines: reg.Gauge(nameGoroutines),
goAllocBytes: reg.Gauge(nameGoAllocBytes),
goTotalBytes: reg.Gauge(nameGoTotalBytes),
cgoAllocBytes: reg.Gauge(nameCgoAllocBytes),
cgoTotalBytes: reg.Gauge(nameCgoTotalBytes),
gcCount: reg.Gauge(nameGCCount),
gcPauseNS: reg.Gauge(nameGCPauseNS),
gcPausePercent: reg.GaugeFloat64(nameGCPausePercent),
cpuUserNS: reg.Gauge(nameCPUUserNS),
cpuUserPercent: reg.GaugeFloat64(nameCPUUserPercent),
cpuSysNS: reg.Gauge(nameCPUSysNS),
cpuSysPercent: reg.GaugeFloat64(nameCPUSysPercent),
rss: reg.Gauge(nameRSS),
}
}