stats: publish last gc PauseNS
This commit is contained in:
parent
befd6c47d4
commit
c56a7f25f0
1 changed files with 2 additions and 0 deletions
|
@ -27,6 +27,7 @@ type BasicMemStats struct {
|
||||||
|
|
||||||
// Garbage collector statistics.
|
// Garbage collector statistics.
|
||||||
PauseTotalNs uint64
|
PauseTotalNs uint64
|
||||||
|
PauseNs uint64
|
||||||
}
|
}
|
||||||
|
|
||||||
type memStatsPlaceholder interface{}
|
type memStatsPlaceholder interface{}
|
||||||
|
@ -72,5 +73,6 @@ func (s *MemStatsWrapper) Update() {
|
||||||
s.basic.HeapReleased = s.cache.HeapReleased
|
s.basic.HeapReleased = s.cache.HeapReleased
|
||||||
s.basic.HeapObjects = s.cache.HeapObjects
|
s.basic.HeapObjects = s.cache.HeapObjects
|
||||||
s.basic.PauseTotalNs = s.cache.PauseTotalNs
|
s.basic.PauseTotalNs = s.cache.PauseTotalNs
|
||||||
|
s.basic.PauseNs = s.cache.PauseNs[(s.cache.NumGC+255)%256]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue