StatsBuffer { public double getStdDev() { return stddev; } StatsBuffer(int size, double[] percentiles); void reset(); void record(long n); void computeStats(); int getCount(); double getMean(); double getVariance(); double getStdDev(); long getMin(); long getMax(); long getTotalTime(); double[] getPercentileValues(); double[] getPercentiles(); double getPercentileValueForIdx(int index);  }
@Test public void testStdDevNoWrap() { StatsBuffer buffer = getNoWrap(); assertEquals(buffer.getStdDev(), 144.77051, 1e-4); }
@Test public void testStdDevWrap() { StatsBuffer buffer = getWithWrap(); assertEquals(buffer.getStdDev(), Math.sqrt(EXPECTED_VARIANCE_WRAP), 1e-4); }