diff options
Diffstat (limited to 'staging_vespalib/src/vespa/vespalib/metrics/counter_aggregator.cpp')
-rw-r--r-- | staging_vespalib/src/vespa/vespalib/metrics/counter_aggregator.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/staging_vespalib/src/vespa/vespalib/metrics/counter_aggregator.cpp b/staging_vespalib/src/vespa/vespalib/metrics/counter_aggregator.cpp index 6c7e42da193..5102ebb121b 100644 --- a/staging_vespalib/src/vespa/vespalib/metrics/counter_aggregator.cpp +++ b/staging_vespalib/src/vespa/vespalib/metrics/counter_aggregator.cpp @@ -6,18 +6,11 @@ namespace vespalib { namespace metrics { -CounterAggregator::CounterAggregator(MetricIdentifier id) - : idx(id), count(0) +CounterAggregator::CounterAggregator(const Counter::Increment &increment) + : idx(increment.idx), count(increment.value) {} void -CounterAggregator::merge(const Counter::Increment &increment) -{ - assert(idx == increment.idx); - count += increment.value; -} - -void CounterAggregator::merge(const CounterAggregator &other) { assert(idx == other.idx); |