• 如果您觉得本站非常有看点,那么赶紧使用Ctrl+D 收藏吧

Java IResultsConsumer类的典型用法和代码示例

java 2次浏览

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

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

示例1: getConsumersUnsafe

点赞 3

import com.carrotsearch.junitbenchmarks.IResultsConsumer; //导入依赖的package包/类
private static IResultsConsumer[] getConsumersUnsafe(IResultsConsumer... additional) throws IOException {
    List<IResultsConsumer> consumers = new ArrayList<IResultsConsumer>();
    consumers.add(new XMLConsumer(new File("jub." + Math.abs(System.nanoTime()) + ".xml")));
    consumers.add(new WriterConsumer()); // defaults to System.out
    consumers.add(new CsvConsumer("target/jub.csv"));

    if (null != System.getenv(ENV_EFFORT_GENERATE)) {
        String file = getEffortFilePath();
        Writer writer = new FileWriter(file, true);
        log.info("Opened " + file + " for appending");
        consumers.add(new TimeScaleConsumer(writer));
    }

    for (IResultsConsumer c : additional) {
        consumers.add(c);
    }

    return consumers.toArray(new IResultsConsumer[consumers.size()]);
}
 

开发者ID:graben1437,
项目名称:titan1withtp3.1,
代码行数:20,
代码来源:JUnitBenchmarkProvider.java

示例2: getConsumers

点赞 2

import com.carrotsearch.junitbenchmarks.IResultsConsumer; //导入依赖的package包/类
private static IResultsConsumer[] getConsumers(IResultsConsumer... additional) {
    try {
        return getConsumersUnsafe(additional);
    } catch (IOException e) {
        throw new RuntimeException(e);
    }
}
 

开发者ID:graben1437,
项目名称:titan1withtp3.1,
代码行数:8,
代码来源:JUnitBenchmarkProvider.java

示例3: AdjustableRoundsBenchmarkRule

点赞 2

import com.carrotsearch.junitbenchmarks.IResultsConsumer; //导入依赖的package包/类
public AdjustableRoundsBenchmarkRule(Map<String, Integer> efforts, IResultsConsumer... consumers) {
    rule = new BenchmarkRule(consumers);
    this.efforts = efforts;
}
 

开发者ID:graben1437,
项目名称:titan1withtp3.1,
代码行数:5,
代码来源:JUnitBenchmarkProvider.java

示例4: get

点赞 1

import com.carrotsearch.junitbenchmarks.IResultsConsumer; //导入依赖的package包/类
/**
 * Like {@link #get()}, except extra JUB Results consumers can be attached
 * to the returned rule.
 *
 * @param additionalConsumers
 *            extra JUB results consumers to apply in the returned rule
 *            object
 * @return a BenchmarkRule ready for use with the JUnit @Rule annotation
 */
public static TestRule get(IResultsConsumer... additionalConsumers) {
    return new AdjustableRoundsBenchmarkRule(efforts, getConsumers(additionalConsumers));
}
 

开发者ID:graben1437,
项目名称:titan1withtp3.1,
代码行数:13,
代码来源:JUnitBenchmarkProvider.java


版权声明:本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系管理员进行删除。
喜欢 (0)