Examples of eventEnded()


Examples of org.apache.hadoop.hdfs.storageservice.server.ClientProxyMetrics.EventDurationCalculator.eventEnded()

  public void testEventDurationCalculator0() throws InterruptedException {
    EventDurationCalculator calc0 = new EventDurationCalculator();
    long start = System.nanoTime();
    calc0.eventStarted();
    Thread.sleep(300);
    calc0.eventEnded();
    Thread.sleep(600);
    calc0.eventStarted();
    Thread.sleep(100);
    calc0.eventEnded();
    Thread.sleep(400);
View Full Code Here

Examples of org.apache.hadoop.hdfs.storageservice.server.ClientProxyMetrics.EventDurationCalculator.eventEnded()

    Thread.sleep(300);
    calc0.eventEnded();
    Thread.sleep(600);
    calc0.eventStarted();
    Thread.sleep(100);
    calc0.eventEnded();
    Thread.sleep(400);
    calc0.eventStarted();
    Thread.sleep(200);
    calc0.eventEnded();
    long end = System.nanoTime();
View Full Code Here

Examples of org.apache.hadoop.hdfs.storageservice.server.ClientProxyMetrics.EventDurationCalculator.eventEnded()

    Thread.sleep(100);
    calc0.eventEnded();
    Thread.sleep(400);
    calc0.eventStarted();
    Thread.sleep(200);
    calc0.eventEnded();
    long end = System.nanoTime();
    assertEquals(1600D, (end - start) / 1e6, 10D);
    assertEquals(200D, calc0.getMean(), 10D);
  }
View Full Code Here

Examples of org.apache.hadoop.hdfs.storageservice.server.ClientProxyMetrics.EventDurationCalculator.eventEnded()

    Thread.sleep(300);
    calc0.eventStarted();
    Thread.sleep(600);
    calc0.eventStarted();
    Thread.sleep(100);
    calc0.eventEnded();
    Thread.sleep(400);
    calc0.eventEnded();
    Thread.sleep(200);
    calc0.eventEnded();
    long end = System.nanoTime();
View Full Code Here

Examples of org.apache.hadoop.hdfs.storageservice.server.ClientProxyMetrics.EventDurationCalculator.eventEnded()

    Thread.sleep(600);
    calc0.eventStarted();
    Thread.sleep(100);
    calc0.eventEnded();
    Thread.sleep(400);
    calc0.eventEnded();
    Thread.sleep(200);
    calc0.eventEnded();
    long end = System.nanoTime();
    assertEquals(1600D, (end - start) / 1e6, 10D);
    assertEquals(933D, calc0.getMean(), 10D);
View Full Code Here

Examples of org.apache.hadoop.hdfs.storageservice.server.ClientProxyMetrics.EventDurationCalculator.eventEnded()

    Thread.sleep(100);
    calc0.eventEnded();
    Thread.sleep(400);
    calc0.eventEnded();
    Thread.sleep(200);
    calc0.eventEnded();
    long end = System.nanoTime();
    assertEquals(1600D, (end - start) / 1e6, 10D);
    assertEquals(933D, calc0.getMean(), 10D);
  }
}
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.