Package com.google.caliper.model

Examples of com.google.caliper.model.Measurement


    }
  }
 
  @Override public Iterable<Measurement> measure() throws Exception {
    long nanos = invokeTimeMethod(nextReps);
    Measurement measurement = new Measurement.Builder()
        .description("runtime")
        .value(Value.create(nanos, "ns"))
        .weight(nextReps)
        .build();
   
View Full Code Here


  public void testSuccess() throws Exception {
    runner.forBenchmark(TestBenchmark.class)
        .instrument("arbitrary")
        .run();
    Measurement measurement = Iterables.getOnlyElement(
        Iterables.getOnlyElement(runner.trials()).measurements());
    Measurement expected = new Measurement.Builder()
        .description("fake measurment")
        .weight(1)
        .value(Value.create(1.0, "hz"))
        .build();
    assertEquals(expected, measurement);
View Full Code Here

                log.notifyMeasurementStarting();
                final int reps = 5;
                final long nanos = invokeLatencyMethod(reps);

                final Measurement measure = new Measurement();
                measure.value = (double) nanos;
                measure.weight = (double) (reps * repeatFactor);
                measure.unit = "ns";
                measure.description = "propagation latency";
                final double nanosPerRep = measure.value / measure.weight;
View Full Code Here

                long nanos = invokeTimeMethod(reps);
                double nanos_per_rep = nanos / reps;
                double seconds = (double) nanos_per_rep / 1000000000;
                double messages_per_second = totalMessages / seconds;

                Measurement m = new Measurement();
                m.value = messages_per_second;
                m.weight = 1;
                m.unit = "Messages per Second";
                m.description = "";
                double nanosPerRep = m.value / m.weight;
View Full Code Here

            values = getValues(modelResult.measurements);
            min = Doubles.min(values);
            max = Doubles.max(values);
            median = computeMedian(values);
            mean = computeMean(values);
            final Measurement firstMeasurement = modelResult.measurements.get(0);
            responseUnit = firstMeasurement.unit;
            responseDesc = firstMeasurement.description;
        }
View Full Code Here

TOP

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

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.