IllegalArgumentException, InvocationTargetException {
TestOptions opts = new PerformanceEvaluation.TestOptions();
opts.setValueZipf(true);
final int valueSize = 1024;
opts.setValueSize(valueSize);
RandomReadTest rrt = new RandomReadTest(null, opts, null);
Constructor<?> ctor =
Histogram.class.getDeclaredConstructor(com.yammer.metrics.stats.Sample.class);
ctor.setAccessible(true);
Histogram histogram = (Histogram)ctor.newInstance(new UniformSample(1024 * 500));
for (int i = 0; i < 100; i++) {
histogram.update(rrt.getValueLength(null));
}
double stddev = histogram.stdDev();
assertTrue(stddev != 0 && stddev != 1.0);
assertTrue(histogram.stdDev() != 0);
Snapshot snapshot = histogram.getSnapshot();