Search in sources :

Example 1 with MeasurementSet

use of com.google.caliper.MeasurementSet in project netty by netty.

the class CaliperMeasure method appendTo.

/**
     * Attach this measure to parent caliper run.
     */
public void appendTo(final Run run) {
    final Scenario scenario = new Scenario(variables());
    /** display rate as caliper durations */
    final MeasurementSet timeSet = measurementSet(rateMap);
    final String timeLog = null;
    /** display time as caliper instances */
    final MeasurementSet instSet = measurementSet(timeMap);
    final String instLog = null;
    /** display size as caliper memory */
    final MeasurementSet heapSet = measurementSet(sizeMap);
    final String heapLog = null;
    final ScenarioResult scenarioResult = new ScenarioResult(timeSet, timeLog, instSet, instLog, heapSet, heapLog);
    final Map<Scenario, ScenarioResult> measurements = run.getMeasurements();
    measurements.put(scenario, scenarioResult);
}
Also used : ScenarioResult(com.google.caliper.ScenarioResult) MeasurementSet(com.google.caliper.MeasurementSet) Scenario(com.google.caliper.Scenario)

Aggregations

MeasurementSet (com.google.caliper.MeasurementSet)1 Scenario (com.google.caliper.Scenario)1 ScenarioResult (com.google.caliper.ScenarioResult)1