use of com.google.caliper.ScenarioResult 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);
}
use of com.google.caliper.ScenarioResult in project netty by netty.
the class CaliperRunner method newRun.
/**
* Provide new named run instance.
*/
public static Run newRun(final String benchmarkName) {
final Map<Scenario, ScenarioResult> measurements = new HashMap<Scenario, ScenarioResult>();
final Date executedTimestamp = new Date();
return new Run(measurements, benchmarkName, executedTimestamp);
}
Aggregations