|
@@ -53,12 +53,12 @@ func TestDebugGCStatsDoubleRegister(t *testing.T) {
|
|
|
zero := debugMetrics.GCStats.NumGC.Value() // Get a "zero" since GC may have run before these tests.
|
|
zero := debugMetrics.GCStats.NumGC.Value() // Get a "zero" since GC may have run before these tests.
|
|
|
runtime.GC()
|
|
runtime.GC()
|
|
|
CaptureDebugGCStatsOnce(r)
|
|
CaptureDebugGCStatsOnce(r)
|
|
|
- if numGC := debugMetrics.GCStats.NumGC.Value(); 1 != numGC - zero {
|
|
|
|
|
|
|
+ if numGC := debugMetrics.GCStats.NumGC.Value(); 1 != numGC-zero {
|
|
|
t.Errorf("NumGC got %d, expected 1", numGC)
|
|
t.Errorf("NumGC got %d, expected 1", numGC)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
RegisterDebugGCStats(r)
|
|
RegisterDebugGCStats(r)
|
|
|
- if numGC := debugMetrics.GCStats.NumGC.Value(); 1 != numGC - zero {
|
|
|
|
|
- t.Errorf("NumGC got %d, expected 1", numGC - zero)
|
|
|
|
|
|
|
+ if numGC := debugMetrics.GCStats.NumGC.Value(); 1 != numGC-zero {
|
|
|
|
|
+ t.Errorf("NumGC got %d, expected 1", numGC-zero)
|
|
|
}
|
|
}
|
|
|
-}
|
|
|
|
|
|
|
+}
|