当前位置: 首页>>代码示例>>Java>>正文


Java Scenario类代码示例

本文整理汇总了Java中com.google.caliper.Scenario的典型用法代码示例。如果您正苦于以下问题:Java Scenario类的具体用法?Java Scenario怎么用?Java Scenario使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Scenario类属于com.google.caliper包,在下文中一共展示了Scenario类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: appendTo

import com.google.caliper.Scenario; //导入依赖的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: newRun

import com.google.caliper.Scenario; //导入依赖的package包/类
/**
 * 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();
    final Run run = new Run(measurements, benchmarkName, executedTimestamp);
    return run;
}
 
开发者ID:kyle-liu,项目名称:netty4study,代码行数:10,代码来源:CaliperRunner.java

示例3: newRun

import com.google.caliper.Scenario; //导入依赖的package包/类
/**
 * 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);
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:9,代码来源:CaliperRunner.java


注:本文中的com.google.caliper.Scenario类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。