Package com.google.caliper.util

Examples of com.google.caliper.util.ShortDuration.times()


  @Test public void testCalculateTargetReps_tinyBenchmark() {
    // this is one cycle on a 5GHz machine
    ShortDuration oneCycle = ShortDuration.of(new BigDecimal("2.0e-10"), SECONDS);
    long targetReps = calculateTargetReps(INITIAL_REPS,
        oneCycle.times(INITIAL_REPS).to(NANOSECONDS), TIMING_INTERVAL.to(NANOSECONDS), 0.0);
    long expectedReps = TIMING_INTERVAL.toPicos() / oneCycle.toPicos();
    assertEquals(expectedReps, targetReps);
  }

  @Test public void testCalculateTargetReps_hugeBenchmark() {
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.