Przeglądaj źródła

Fix nil pointer dereference reported by @chuhnk on Twitter.

Richard Crowley 12 lat temu
rodzic
commit
6aecfa95e1
1 zmienionych plików z 1 dodań i 0 usunięć
  1. 1 0
      debug.go

+ 1 - 0
debug.go

@@ -56,6 +56,7 @@ func RegisterDebugGCStats(r Registry) {
 	debugMetrics.GCStats.Pause = NewHistogram(NewExpDecaySample(1028, 0.015))
 	//debugMetrics.GCStats.PauseQuantiles = NewHistogram(NewExpDecaySample(1028, 0.015))
 	debugMetrics.GCStats.PauseTotal = NewGauge()
+	debugMetrics.ReadGCStats = NewTimer()
 
 	r.Register("debug.GCStats.LastGC", NewGauge())
 	r.Register("debug.GCStats.NumGC", NewGauge())