1 package com.griddynamics.jagger.engine.e1.collector;
3 import com.griddynamics.jagger.util.statistics.StatisticsCalculator;
10 private Double percentile = 95D;
13 this.percentile = percentile;
20 return new PercentileAggregator();
24 private StatisticsCalculator statisticsCalculator =
new StatisticsCalculator();
27 public void append(Number calculated) {
28 statisticsCalculator.addValue(calculated.doubleValue());
32 public Number getAggregated() {
33 Double result = statisticsCalculator.getPercentile(percentile);
34 return result.isNaN() ? null : result;
39 statisticsCalculator.reset();
43 public String getName() {
44 return percentile +
"%";