21 package com.griddynamics.jagger.engine.e1.collector;
23 import org.slf4j.Logger;
24 import org.slf4j.LoggerFactory;
35 return new SumMetricAggregator();
38 private static class SumMetricAggregator
implements MetricAggregator<Number> {
40 Logger log = LoggerFactory.getLogger(SumMetricAggregator.class);
45 public void append(Number calculated) {
46 log.debug(
"append({})", calculated);
50 sum += calculated.doubleValue();
54 public Number getAggregated() {
58 return sum.doubleValue();
63 log.debug(
"Reset aggregator");
68 public String getName() {
73 public String toString() {
74 return "SumMetricAggregator{" +