mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 13:21:37 +00:00
metrics: reset internal value slice in Clear (#34761)
This commit is contained in:
parent
ac406c2fe7
commit
077d83387a
1 changed files with 1 additions and 1 deletions
|
|
@ -314,7 +314,7 @@ func (s *UniformSample) Clear() {
|
||||||
s.mutex.Lock()
|
s.mutex.Lock()
|
||||||
defer s.mutex.Unlock()
|
defer s.mutex.Unlock()
|
||||||
s.count = 0
|
s.count = 0
|
||||||
clear(s.values)
|
s.values = s.values[:0]
|
||||||
}
|
}
|
||||||
|
|
||||||
// Snapshot returns a read-only copy of the sample.
|
// Snapshot returns a read-only copy of the sample.
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue