mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 18:01:36 +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()
|
||||
defer s.mutex.Unlock()
|
||||
s.count = 0
|
||||
clear(s.values)
|
||||
s.values = s.values[:0]
|
||||
}
|
||||
|
||||
// Snapshot returns a read-only copy of the sample.
|
||||
|
|
|
|||
Loading…
Reference in a new issue