Skip to content

Commit

Permalink
Refactoring names from rcrowley#64 slightly
Browse files Browse the repository at this point in the history
  • Loading branch information
rcrowley committed Aug 3, 2014
1 parent bf838b8 commit ee7df1b
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions runtime.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ var (
NumGoroutine Gauge
ReadMemStats Timer
}
numGC uint32
numMallocs uint64
numFrees uint64
numLookups uint64
frees uint64
lookups uint64
mallocs uint64
numGC uint32
)

// Capture new values for the Go runtime statistics exported in
Expand Down Expand Up @@ -81,16 +81,16 @@ func CaptureRuntimeMemStatsOnce(r Registry) {
runtimeMetrics.MemStats.EnableGC.Update(0)
}

runtimeMetrics.MemStats.Frees.Update(int64(memStats.Frees - numFrees))
runtimeMetrics.MemStats.Frees.Update(int64(memStats.Frees - frees))
runtimeMetrics.MemStats.HeapAlloc.Update(int64(memStats.HeapAlloc))
runtimeMetrics.MemStats.HeapIdle.Update(int64(memStats.HeapIdle))
runtimeMetrics.MemStats.HeapInuse.Update(int64(memStats.HeapInuse))
runtimeMetrics.MemStats.HeapObjects.Update(int64(memStats.HeapObjects))
runtimeMetrics.MemStats.HeapReleased.Update(int64(memStats.HeapReleased))
runtimeMetrics.MemStats.HeapSys.Update(int64(memStats.HeapSys))
runtimeMetrics.MemStats.LastGC.Update(int64(memStats.LastGC))
runtimeMetrics.MemStats.Lookups.Update(int64(memStats.Lookups - numLookups))
runtimeMetrics.MemStats.Mallocs.Update(int64(memStats.Mallocs - numMallocs))
runtimeMetrics.MemStats.Lookups.Update(int64(memStats.Lookups - lookups))
runtimeMetrics.MemStats.Mallocs.Update(int64(memStats.Mallocs - mallocs))
runtimeMetrics.MemStats.MCacheInuse.Update(int64(memStats.MCacheInuse))
runtimeMetrics.MemStats.MCacheSys.Update(int64(memStats.MCacheSys))
runtimeMetrics.MemStats.MSpanInuse.Update(int64(memStats.MSpanInuse))
Expand All @@ -116,10 +116,10 @@ func CaptureRuntimeMemStatsOnce(r Registry) {
runtimeMetrics.MemStats.PauseNs.Update(int64(memStats.PauseNs[i]))
}
}
frees = memStats.Frees
lookups = memStats.Lookups
mallocs = memStats.Mallocs
numGC = memStats.NumGC
numMallocs = memStats.Mallocs
numFrees = memStats.Frees
numLookups = memStats.Lookups

runtimeMetrics.MemStats.PauseTotalNs.Update(int64(memStats.PauseTotalNs))
runtimeMetrics.MemStats.StackInuse.Update(int64(memStats.StackInuse))
Expand Down

0 comments on commit ee7df1b

Please sign in to comment.