Richard Crowley 12 年 前
コミット
50619b14a0
3 ファイル変更30 行追加30 行削除
  1. 2 2
      debug.go
  2. 1 1
      registry.go
  3. 27 27
      runtime.go

+ 2 - 2
debug.go

@@ -9,8 +9,8 @@ var (
 	debugMetrics struct {
 		GCStats struct {
 			LastGC Gauge
-			NumGC Gauge
-			Pause Histogram
+			NumGC  Gauge
+			Pause  Histogram
 			//PauseQuantiles Histogram
 			PauseTotal Gauge
 		}

+ 1 - 1
registry.go

@@ -39,7 +39,7 @@ var _ Registry = &StandardRegistry{}
 func NewRegistry() *StandardRegistry {
 	return &StandardRegistry{
 		metrics: make(map[string]interface{}),
-		mutex: &sync.Mutex{},
+		mutex:   &sync.Mutex{},
 	}
 }
 

+ 27 - 27
runtime.go

@@ -6,41 +6,41 @@ import (
 )
 
 var (
-	memStats runtime.MemStats
+	memStats       runtime.MemStats
 	runtimeMetrics struct {
 		MemStats struct {
-			Alloc Gauge
-			BuckHashSys Gauge
-			DebugGC Gauge
-			EnableGC Gauge
-			Frees Gauge
-			HeapAlloc Gauge
-			HeapIdle Gauge
-			HeapInuse Gauge
-			HeapObjects Gauge
+			Alloc        Gauge
+			BuckHashSys  Gauge
+			DebugGC      Gauge
+			EnableGC     Gauge
+			Frees        Gauge
+			HeapAlloc    Gauge
+			HeapIdle     Gauge
+			HeapInuse    Gauge
+			HeapObjects  Gauge
 			HeapReleased Gauge
-			HeapSys Gauge
-			LastGC Gauge
-			Lookups Gauge
-			Mallocs Gauge
-			MCacheInuse Gauge
-			MCacheSys Gauge
-			MSpanInuse Gauge
-			MSpanSys Gauge
-			NextGC Gauge
-			NumGC Gauge
-			PauseNs Histogram
+			HeapSys      Gauge
+			LastGC       Gauge
+			Lookups      Gauge
+			Mallocs      Gauge
+			MCacheInuse  Gauge
+			MCacheSys    Gauge
+			MSpanInuse   Gauge
+			MSpanSys     Gauge
+			NextGC       Gauge
+			NumGC        Gauge
+			PauseNs      Histogram
 			PauseTotalNs Gauge
-			StackInuse Gauge
-			StackSys Gauge
-			Sys Gauge
-			TotalAlloc Gauge
+			StackInuse   Gauge
+			StackSys     Gauge
+			Sys          Gauge
+			TotalAlloc   Gauge
 		}
-		NumCgoCall Gauge
+		NumCgoCall   Gauge
 		NumGoroutine Gauge
 		ReadMemStats Timer
 	}
-	numGC    uint32
+	numGC uint32
 )
 
 // Capture new values for the Go runtime statistics exported in