當前位置: 首頁>>代碼示例>>Java>>正文


Java MeasurementSet類代碼示例

本文整理匯總了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);
}
 
開發者ID:wuyinxian124,項目名稱:netty4.0.27Learn,代碼行數:28,代碼來源:CaliperMeasure.java

示例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);
}
 
開發者ID:wuyinxian124,項目名稱:netty4.0.27Learn,代碼行數:5,代碼來源:CaliperMeasure.java

示例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;
}
 
開發者ID:kyle-liu,項目名稱:netty4study,代碼行數:6,代碼來源:CaliperMeasure.java


注:本文中的com.google.caliper.MeasurementSet類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。