mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-12 01:41:36 +00:00
metrics: clear do not reset length
This commit is contained in:
parent
eb67d61933
commit
56c23ca424
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