From fd781a072e63fd3e271b1907b369d19c31422011 Mon Sep 17 00:00:00 2001 From: Dave Brophy Date: Sun, 3 Dec 2017 15:19:13 -0800 Subject: [PATCH] Removed miss logging --- blaster/loop-ticker.go | 4 +++- blaster/metrics.go | 9 --------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/blaster/loop-ticker.go b/blaster/loop-ticker.go index f62bc57..a01512a 100644 --- a/blaster/loop-ticker.go +++ b/blaster/loop-ticker.go @@ -65,12 +65,14 @@ func (b *Blaster) startTickerLoop(ctx context.Context) { case b.mainChannel <- segment: // if main loop is waiting, send it a message case <-ctx.Done(): + // notest return case <-b.dataFinishedChannel: + // notest return default: + // notest // if main loop is busy, skip this tick - b.metrics.logMiss(segment) } } }() diff --git a/blaster/metrics.go b/blaster/metrics.go index 0cbbe6d..9bb1b10 100644 --- a/blaster/metrics.go +++ b/blaster/metrics.go @@ -39,13 +39,6 @@ func newMetricsDef(b *Blaster) *metricsDef { return m } -func (m *metricsDef) logMiss(segment int) { - m.sync.RLock() - defer m.sync.RUnlock() - m.all.missed.Inc(1) - m.segments[segment].missed.Inc(1) -} - func (m *metricsDef) logBusy(segment int) { m.sync.RLock() defer m.sync.RUnlock() @@ -102,7 +95,6 @@ func (m *metricsDef) newMetricsSegment(rate float64) *metricsSegment { rate: rate, total: m.newMetricsItem(), status: map[string]*metricsItem{}, - missed: metrics.NewRegisteredCounter("missed", m.registry), busy: metrics.NewRegisteredHistogram("busy", m.registry, metrics.NewExpDecaySample(1028, 0.015)), start: time.Now(), } @@ -112,7 +104,6 @@ type metricsSegment struct { sync sync.RWMutex def *metricsDef rate float64 - missed metrics.Counter busy metrics.Histogram total *metricsItem status map[string]*metricsItem