From 0686610ea62975ac22ccb12957f65081aea55526 Mon Sep 17 00:00:00 2001 From: Achille Roussel Date: Fri, 2 Dec 2016 16:56:56 -0800 Subject: [PATCH] reduce memory allocations on observe operations --- metric.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/metric.go b/metric.go index ce543ec..b2a4d09 100644 --- a/metric.go +++ b/metric.go @@ -123,9 +123,6 @@ func metricOpSet(state *metricState, value float64, mod time.Time, exp time.Time } func metricOpObserve(state *metricState, value float64, mod time.Time, exp time.Time, version uint64) { - if state.metrics == nil { - state.metrics = make([]metricSubState, 0, 100) - } state.version = version state.modTime = mod state.expTime = exp