Package com.google.caliper.model

Examples of com.google.caliper.model.Trial


  @Test
  public void intrinsics() throws Exception {
    runner.forBenchmark(ArrayListGrowthBenchmark.class)
        .instrument("allocation")
        .run();
    Trial trial = Iterables.getOnlyElement(runner.trials());
    ImmutableListMultimap<String, Measurement> measurementsByDescription =
        Measurement.indexByDescription(trial.measurements());
    // 14 objects and 1960 bytes are the known values for growing an ArrayList from 1 element to 100
    // elements
    for (Measurement objectMeasurement : measurementsByDescription.get("objects")) {
      assertEquals(14.0, objectMeasurement.value().magnitude() / objectMeasurement.weight(), 0.001);
    }
View Full Code Here


    for (int i = 0; i < options.trialsPerScenario(); i++) {
      for (Experiment experiment : experimentsToRun) {
        stdout.printf("Starting trial %d of %d: %s\u2026 ",
            trialNumber, totalTrials, experiment);
        try {
          Trial trial = TrialScopes.makeContext(UUID.randomUUID(), trialNumber, experiment)
              .call(new Callable<Trial>() {
                @Override public Trial call() throws Exception {
                  return runLoopProvider.get().call();
                }
              });
View Full Code Here

TOP

Related Classes of com.google.caliper.model.Trial

Copyright © 2018 www.massapicom. 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.