Skip to content

Commit

Permalink
Removed miss logging
Browse files Browse the repository at this point in the history
  • Loading branch information
dave committed Dec 3, 2017
1 parent d203c70 commit fd781a0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
4 changes: 3 additions & 1 deletion blaster/loop-ticker.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}()
Expand Down
9 changes: 0 additions & 9 deletions blaster/metrics.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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(),
}
Expand All @@ -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
Expand Down

0 comments on commit fd781a0

Please sign in to comment.