Examples of MeanDevAccumulator


Examples of org.apache.hadoop.hdfs.storageservice.NNLatencyBenchmark.MeanDevAccumulator

    MiniAvatarCluster.shutDownZooKeeper();
  }

  @Test
  public void testMeanDevAccumulator() {
    MeanDevAccumulator acc0 = new MeanDevAccumulator();
    for (int i : new int[]{2, 4, 4, 4, 5, 5, 5, 7, 9}) {
      acc0.add(i);
    }
    assertEquals(5, acc0.getMean(), 1e-6);
    assertEquals(4, acc0.getVariance(), 1e-6);
    assertEquals(2, acc0.getStdDev(), 1e-6);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.