mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 17:44:29 +00:00
race_in_metrics (#1220)
This commit is contained in:
parent
8415ab475e
commit
3c5b2bea94
@ -207,7 +207,9 @@ func (m *StandardMeter) Count() int64 {
|
|||||||
|
|
||||||
// Mark records the occurrence of n events.
|
// Mark records the occurrence of n events.
|
||||||
func (m *StandardMeter) Mark(n int64) {
|
func (m *StandardMeter) Mark(n int64) {
|
||||||
atomic.AddInt64(&m.snapshot.temp, n)
|
m.lock.Lock()
|
||||||
|
m.snapshot.temp = n
|
||||||
|
m.lock.Unlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rate1 returns the one-minute moving average rate of events per second.
|
// Rate1 returns the one-minute moving average rate of events per second.
|
||||||
|
Loading…
Reference in New Issue
Block a user