From c56a7f25f0fee474c34e15ec2fa902dd18556eb5 Mon Sep 17 00:00:00 2001 From: David Wilemski Date: Thu, 20 Aug 2015 11:50:06 -0700 Subject: [PATCH] stats: publish last gc PauseNS --- stats/mem.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/stats/mem.go b/stats/mem.go index 8ca0577..279cd9a 100644 --- a/stats/mem.go +++ b/stats/mem.go @@ -27,6 +27,7 @@ type BasicMemStats struct { // Garbage collector statistics. PauseTotalNs uint64 + PauseNs uint64 } type memStatsPlaceholder interface{} @@ -72,5 +73,6 @@ func (s *MemStatsWrapper) Update() { s.basic.HeapReleased = s.cache.HeapReleased s.basic.HeapObjects = s.cache.HeapObjects s.basic.PauseTotalNs = s.cache.PauseTotalNs + s.basic.PauseNs = s.cache.PauseNs[(s.cache.NumGC+255)%256] } }