public void report() { synchronized (_statistics) { LOGGER.info("--------------------------------------------------------------------------------"); LOGGER.info("{}:", _name); LOGGER.info(_statistics.toString()); LOGGER.info("10th percentile: {}", _statistics.getPercentile(10.0)); LOGGER.info("25th percentile: {}", _statistics.getPercentile(25.0)); LOGGER.info("50th percentile: {}", _statistics.getPercentile(50.0)); LOGGER.info("90th percentile: {}", _statistics.getPercentile(90.0)); LOGGER.info("95th percentile: {}", _statistics.getPercentile(95.0)); LOGGER.info("99th percentile: {}", _statistics.getPercentile(99.0)); LOGGER.info("99.9th percentile: {}", _statistics.getPercentile(99.9)); LOGGER.info("--------------------------------------------------------------------------------"); } }
/** * Calculate the 99 % fractile of the <code>ResponsetimeSample</code> instances. * * @return the 99% fractile of all responsetimes */ public final double getPercentile99() { return responsetimeStats.getPercentile( PERCENTILE_99 ); }
/** * Calculate the 95 % fractile of the <code>ResponsetimeSample</code> instances. * * @return the 95% fractile of all responsetimes */ public final double getPercentile95() { return responsetimeStats.getPercentile( PERCENTILE_95 ); }
public Date getPercentile25() { if (_statistics instanceof DescriptiveStatistics) { double percentileTimestamp = ((DescriptiveStatistics) _statistics).getPercentile(25.0); if (Double.isNaN(percentileTimestamp)) { return null; } return new Date(Double.valueOf(percentileTimestamp).longValue()); } return null; }
public Date getPercentile75() { if (_statistics instanceof DescriptiveStatistics) { final double percentileTimestamp = ((DescriptiveStatistics) _statistics).getPercentile(75.0); if (Double.isNaN(percentileTimestamp)) { return null; } return new Date(Double.valueOf(percentileTimestamp).longValue()); } return null; }
public Date getPercentile25() { if (_statistics instanceof DescriptiveStatistics) { final double percentileTimestamp = ((DescriptiveStatistics) _statistics).getPercentile(25.0); if (Double.isNaN(percentileTimestamp)) { return null; } return new Date(Double.valueOf(percentileTimestamp).longValue()); } return null; }
public Date getMedian() { if (_statistics instanceof DescriptiveStatistics) { double medianTimestamp = ((DescriptiveStatistics) _statistics).getPercentile(50.0); if (Double.isNaN(medianTimestamp)) { return null; } return new Date(Double.valueOf(medianTimestamp).longValue()); } return null; }
public Date getMedian() { if (_statistics instanceof DescriptiveStatistics) { final double medianTimestamp = ((DescriptiveStatistics) _statistics).getPercentile(50.0); if (Double.isNaN(medianTimestamp)) { return null; } return new Date(Double.valueOf(medianTimestamp).longValue()); } return null; }
public Date getPercentile75() { if (_statistics instanceof DescriptiveStatistics) { double percentileTimestamp = ((DescriptiveStatistics) _statistics).getPercentile(75.0); if (Double.isNaN(percentileTimestamp)) { return null; } return new Date(Double.valueOf(percentileTimestamp).longValue()); } return null; }
public double getPercentile(int percentage) { if (_stats.getN() == 0) { return 0; } return _stats.getPercentile(percentage * 1.0); } }
public double getPercentile(int percentage) { if (_stats.getN() == 0) { return 0; } return _stats.getPercentile(percentage * 1.0); } }
public double getPercentile(double p) { double result = 0; switch (currentStrategy) { case HEURISTIC: result = adaptiveHistogram.getValueForPercentile(p); break; case AUTO: case EXACT: result = descriptiveStatistics.getPercentile(p); } return result; }
private void logStats(double sla, String name, DescriptiveStatistics ds, String units, List<SortableStat> stats) { //logStatOverSLA(ds.getMin(), sla, units + " min " + name, stats); //logStatOverSLA(ds.getMax(), sla, units + " max " + name, stats); logStatOverSLA(ds.getMean(), sla, units + " mean " + name, stats); //logStatOverSLA(ds.getVariance(), sla,units + " variance " + name, stats); logStatOverSLA(ds.getPercentile(50), sla, units + " 50th " + name, stats); logStatOverSLA(ds.getPercentile(75), sla, units + " 75th " + name, stats); logStatOverSLA(ds.getPercentile(90), sla, units + " 90th " + name, stats); //logStatOverSLA(ds.getPercentile(95), sla, units + " 95th " + name, stats); logStatOverSLA(ds.getPercentile(99), sla, units + " 99th " + name, stats); }
@Override public String getSummaryReport() { final StringBuilder outBuffer = new StringBuilder(); final DescriptiveStatistics ds = computeStats(); outBuffer.append("Aggregate P@" + N + " Statistics:\n"); outBuffer.append(String.format("%-15s\t%6d\n", "num_q", ds.getN())); outBuffer.append(String.format("%-15s\t%6.4f\n", "min", ds.getMin())); outBuffer.append(String.format("%-15s\t%6.4f\n", "max", ds.getMax())); outBuffer.append(String.format("%-15s\t%6.4f\n", "mean", ds.getMean())); outBuffer.append(String.format("%-15s\t%6.4f\n", "std dev", ds.getStandardDeviation())); outBuffer.append(String.format("%-15s\t%6.4f\n", "median", ds.getPercentile(50))); outBuffer.append(String.format("%-15s\t%6.4f\n", "skewness", ds.getSkewness())); outBuffer.append(String.format("%-15s\t%6.4f\n", "kurtosis", ds.getKurtosis())); return outBuffer.toString(); }
@Override public String getSummaryReport() { final StringBuilder outBuffer = new StringBuilder(); final DescriptiveStatistics ds = computeStats(); outBuffer.append("Aggregate P@" + N + " Statistics:\n"); outBuffer.append(String.format("%-15s\t%6d\n", "num_q", ds.getN())); outBuffer.append(String.format("%-15s\t%6.4f\n", "min", ds.getMin())); outBuffer.append(String.format("%-15s\t%6.4f\n", "max", ds.getMax())); outBuffer.append(String.format("%-15s\t%6.4f\n", "mean", ds.getMean())); outBuffer.append(String.format("%-15s\t%6.4f\n", "std dev", ds.getStandardDeviation())); outBuffer.append(String.format("%-15s\t%6.4f\n", "median", ds.getPercentile(50))); outBuffer.append(String.format("%-15s\t%6.4f\n", "skewness", ds.getSkewness())); outBuffer.append(String.format("%-15s\t%6.4f\n", "kurtosis", ds.getKurtosis())); return outBuffer.toString(); }
/** * Generates a text report displaying univariate statistics from values * that have been added. Each statistic is displayed on a separate * line. * * @return String with line feeds displaying statistics */ @Override public String toString() { StringBuilder outBuffer = new StringBuilder(); String endl = "\n"; outBuffer.append("DescriptiveStatistics:").append(endl); outBuffer.append("n: ").append(getN()).append(endl); outBuffer.append("min: ").append(getMin()).append(endl); outBuffer.append("max: ").append(getMax()).append(endl); outBuffer.append("mean: ").append(getMean()).append(endl); outBuffer.append("std dev: ").append(getStandardDeviation()) .append(endl); outBuffer.append("median: ").append(getPercentile(50)).append(endl); outBuffer.append("skewness: ").append(getSkewness()).append(endl); outBuffer.append("kurtosis: ").append(getKurtosis()).append(endl); return outBuffer.toString(); }
/** * Generates a text report displaying univariate statistics from values * that have been added. Each statistic is displayed on a separate * line. * * @return String with line feeds displaying statistics */ @Override public String toString() { StringBuffer outBuffer = new StringBuffer(); String endl = "\n"; outBuffer.append("DescriptiveStatistics:").append(endl); outBuffer.append("n: ").append(getN()).append(endl); outBuffer.append("min: ").append(getMin()).append(endl); outBuffer.append("max: ").append(getMax()).append(endl); outBuffer.append("mean: ").append(getMean()).append(endl); outBuffer.append("std dev: ").append(getStandardDeviation()) .append(endl); outBuffer.append("median: ").append(getPercentile(50)).append(endl); outBuffer.append("skewness: ").append(getSkewness()).append(endl); outBuffer.append("kurtosis: ").append(getKurtosis()).append(endl); return outBuffer.toString(); }
writer.write(String.valueOf(entry.getValue().getMean())); writer.write("\t"); writer.write(String.valueOf(entry.getValue().getPercentile(50))); writer.write("\t"); writer.write(String.valueOf(entry.getValue().getMin()));
writer.write(String.valueOf(stats.getMean())); writer.write(TAB); writer.write(String.valueOf(stats.getPercentile(50))); writer.write(TAB); writer.write(String.valueOf(stats.getMin()));
/** * Generates a text report displaying univariate statistics from values * that have been added. Each statistic is displayed on a separate * line. * * @return String with line feeds displaying statistics */ public String toString() { StringBuffer outBuffer = new StringBuffer(); outBuffer.append("DescriptiveStatistics:\n"); outBuffer.append("n: " + getN() + "\n"); outBuffer.append("min: " + getMin() + "\n"); outBuffer.append("max: " + getMax() + "\n"); outBuffer.append("mean: " + getMean() + "\n"); outBuffer.append("std dev: " + getStandardDeviation() + "\n"); outBuffer.append("median: " + getPercentile(50) + "\n"); outBuffer.append("skewness: " + getSkewness() + "\n"); outBuffer.append("kurtosis: " + getKurtosis() + "\n"); return outBuffer.toString(); }