Example #1
0
func registerGCStats(r metrics.Registry) {
	g := metrics.NewGauge()
	r.Register("local.GCStats.LastGCDuration", g)
}
Example #2
0
func registerRusageStats(r metrics.Registry) {
	for _, metric := range []string{"UserTime", "SystemTime", "MaxRss", "InBlock", "OuBlock"} {
		g := metrics.NewGauge()
		r.Register("rusage."+metric, g)
	}
}