From 65bb583a2256c9a2a91c736c253b1f71af436bd7 Mon Sep 17 00:00:00 2001 From: cui fliter Date: Thu, 8 Sep 2022 10:02:19 +0800 Subject: [PATCH] fix some typos Signed-off-by: cui fliter --- ewma.go | 2 +- meter.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ewma.go b/ewma.go index a8183dd7..279aecc7 100644 --- a/ewma.go +++ b/ewma.go @@ -108,7 +108,7 @@ func (a *StandardEWMA) Tick() { // the lock was acquired. a.mutex.Lock() if atomic.LoadUint32(&a.init) == 1 { - // The fetchInstantRate() uses atomic loading, which is unecessary in this critical section + // The fetchInstantRate() uses atomic loading, which is unnecessary in this critical section // but again, this section is only invoked on the first successful Tick() operation. a.updateRate(a.fetchInstantRate()) } else { diff --git a/meter.go b/meter.go index 223669bc..aa30e40c 100644 --- a/meter.go +++ b/meter.go @@ -156,7 +156,7 @@ func (m *StandardMeter) Count() int64 { return atomic.LoadInt64(&m.snapshot.count) } -// Mark records the occurance of n events. +// Mark records the occurrence of n events. func (m *StandardMeter) Mark(n int64) { if atomic.LoadUint32(&m.stopped) == 1 { return