Package org.apache.hadoop.hbase.metrics.histogram

Examples of org.apache.hadoop.hbase.metrics.histogram.MetricsHistogram.update()


  @Test
  public void testBasicUniform() {
    MetricsHistogram h = new MetricsHistogram("testHistogram", null);

    for (int i = 0; i < 100; i++) {
      h.update(i);
    }

    Assert.assertEquals(100, h.getCount());
    Assert.assertEquals(0, h.getMin());
    Assert.assertEquals(99, h.getMax());
View Full Code Here


    final long[] data = new long[1000];

    for (int i = 0; i < data.length; i++) {
      data[i] = (long) (r.nextGaussian() * 10000.0);
      h.update(data[i]);
    }

    final Snapshot s = h.getSnapshot();
    Arrays.sort(data);

View Full Code Here

  @Test
  public void testBasicUniform() {
    MetricsHistogram h = new MetricsHistogram("testHistogram", null);

    for (int i = 0; i < 100; i++) {
      h.update(i);
    }

    Assert.assertEquals(100, h.getCount());
    Assert.assertEquals(0, h.getMin());
    Assert.assertEquals(99, h.getMax());
View Full Code Here

  @Test
  public void testBasicUniform() {
    MetricsHistogram h = new MetricsHistogram("testHistogram", null);

    for (int i = 0; i < 100; i++) {
      h.update(i);
    }

    Assert.assertEquals(100, h.getCount());
    Assert.assertEquals(0, h.getMin());
    Assert.assertEquals(99, h.getMax());
View Full Code Here

    final long[] data = new long[1000];

    for (int i = 0; i < data.length; i++) {
      data[i] = (long) (r.nextGaussian() * 10000.0);
      h.update(data[i]);
    }

    final Snapshot s = h.getSnapshot();
    Arrays.sort(data);

View Full Code Here

  @Test
  public void testBasicUniform() {
    MetricsHistogram h = new MetricsHistogram("testHistogram", null);

    for (int i = 0; i < 100; i++) {
      h.update(i);
    }

    Assert.assertEquals(100, h.getCount());
    Assert.assertEquals(0, h.getMin());
    Assert.assertEquals(99, h.getMax());
View Full Code Here

    final long[] data = new long[1000];

    for (int i = 0; i < data.length; i++) {
      data[i] = (long) (r.nextGaussian() * 10000.0);
      h.update(data[i]);
    }

    final Snapshot s = h.getSnapshot();
    Arrays.sort(data);

View Full Code Here

  @Test
  public void testBasicUniform() {
    MetricsHistogram h = new MetricsHistogram("testHistogram", null);

    for (int i = 0; i < 100; i++) {
      h.update(i);
    }

    Assert.assertEquals(100, h.getCount());
    Assert.assertEquals(0, h.getMin());
    Assert.assertEquals(99, h.getMax());
View Full Code Here

    final long[] data = new long[1000];

    for (int i = 0; i < data.length; i++) {
      data[i] = (long) (r.nextGaussian() * 10000.0);
      h.update(data[i]);
    }

    final Snapshot s = h.getSnapshot();
    Arrays.sort(data);

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.