21 package com.griddynamics.jagger.engine.e1.collector;
23 import static com.griddynamics.jagger.util.StandardMetricsNamesUtil.AVERAGE_AGGREGATOR_ID;
34 return new AvgMetricAggregator();
37 private static class AvgMetricAggregator
implements MetricAggregator<Number> {
43 public void append(Number calculated) {
47 sum += calculated.doubleValue();
52 public Number getAggregated() {
60 double result = sum / count;
62 return Double.valueOf(result);
72 public String getName() {
73 return AVERAGE_AGGREGATOR_ID;
77 public String toString() {
78 return "AvgMetricAggregator{" +