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


Java BenchmarkRule类代码示例

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


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

示例1: IndexGetChildsPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexGetChildsPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"get-childs_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();

	for(int i = 0; i < this.numItems; ++i) {
		add(def1, getNextFile());
		add(def2, getNextFile());
		add(def3, getNextFile());
		add(use1, getNextFile());
		add(type1, getNextFile());
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:22,代码来源:IndexGetChildsPerformanceTest.java

示例2: IndexPersistPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexPersistPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"persist_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();

	for(int i = 0; i < this.numItems; ++i) {
		add(def1, getNextFile());
		add(def2, getNextFile());
		add(def3, getNextFile());
		add(use1, getNextFile());
		add(type1, getNextFile());
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:22,代码来源:IndexPersistPerformanceTest.java

示例3: IndexGetKeyPartitionsPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexGetKeyPartitionsPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"get-key-partitions_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();

	for(int i = 0; i < this.numItems; ++i) {
		add(def1, getNextFile());
		add(def2, getNextFile());
		add(def3, getNextFile());
		add(use1, getNextFile());
		add(type1, getNextFile());
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:22,代码来源:IndexGetKeyPartitionsPerformanceTest.java

示例4: IndexGetPartitionsPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexGetPartitionsPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"get-partitions_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();

	for(int i = 0; i < this.numItems; ++i) {
		add(def1, getNextFile());
		add(def2, getNextFile());
		add(def3, getNextFile());
		add(use1, getNextFile());
		add(type1, getNextFile());
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:22,代码来源:IndexGetPartitionsPerformanceTest.java

示例5: IndexGetPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexGetPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"get_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();

	for(int i = 0; i < this.numItems; ++i) {
		add(def1, getNextFile());
		add(def2, getNextFile());
		add(def3, getNextFile());
		add(use1, getNextFile());
		add(type1, getNextFile());
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:22,代码来源:IndexGetPerformanceTest.java

示例6: IndexGetPartitionElementsPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexGetPartitionElementsPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"get-partition-elems_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();

	for(int i = 0; i < this.numItems; ++i) {
		add(def1, getNextFile());
		add(def2, getNextFile());
		add(def3, getNextFile());
		add(use1, getNextFile());
		add(type1, getNextFile());
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:22,代码来源:IndexGetPartitionElementsPerformanceTest.java

示例7: IndexCollectPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexCollectPerformanceTest(int numItems, int numFiles) {
	super(numItems, numFiles);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"collect_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}

	index.reset();
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:14,代码来源:IndexCollectPerformanceTest.java

示例8: IndexAddPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexAddPerformanceTest(int numItems, int numFiles) {
    super(numItems, numFiles);

    try {
        benchmarkRun =
            new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
                "add_" + this.numFiles + ".csv", true)));
    } catch(IOException e) {
        e.printStackTrace();
    }

    index.reset();
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:14,代码来源:IndexAddPerformanceTest.java

示例9: IndexClearPerformanceTest

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public IndexClearPerformanceTest(int numItemsPerFile, int numFiles) {
	super(numItemsPerFile, numFiles);

	this.fileIndexToClear = (int) Math.floor((double) this.numFiles / 2);

	try {
		benchmarkRun =
			new BenchmarkRule(new CSVResultsConsumer((this.numItems * 5) + "," + this.numFiles, new FileWriter(
				"clear_" + this.numFiles + ".csv", true)));
	} catch(IOException e) {
		e.printStackTrace();
	}
}
 
开发者ID:metaborg,项目名称:mb-rep,代码行数:14,代码来源:IndexClearPerformanceTest.java

示例10: AdjustableRoundsBenchmarkRule

import com.carrotsearch.junitbenchmarks.BenchmarkRule; //导入依赖的package包/类
public AdjustableRoundsBenchmarkRule(Map<String, Integer> efforts, IResultsConsumer... consumers) {
    rule = new BenchmarkRule(consumers);
    this.efforts = efforts;
}
 
开发者ID:graben1437,项目名称:titan1withtp3.1,代码行数:5,代码来源:JUnitBenchmarkProvider.java


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