本文整理匯總了Java中com.google.caliper.MeasurementSet類的典型用法代碼示例。如果您正苦於以下問題:Java MeasurementSet類的具體用法?Java MeasurementSet怎麽用?Java MeasurementSet使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
MeasurementSet類屬於com.google.caliper包,在下文中一共展示了MeasurementSet類的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: appendTo
import com.google.caliper.MeasurementSet; //導入依賴的package包/類
/**
* 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);
}
示例2: measurementSet
import com.google.caliper.MeasurementSet; //導入依賴的package包/類
private static MeasurementSet measurementSet(final Map<Long, Measurement> map) {
final Measurement[] array = map.values().toArray(new Measurement[map.size()]);
return new MeasurementSet(array);
}
示例3: measurementSet
import com.google.caliper.MeasurementSet; //導入依賴的package包/類
private static MeasurementSet measurementSet(final Map<Long, Measurement> map) {
final Measurement[] array = map.values().toArray(new Measurement[map.size()]);
final MeasurementSet set = new MeasurementSet(array);
return set;
}