本文整理汇总了Java中com.google.caliper.Runner类的典型用法代码示例。如果您正苦于以下问题:Java Runner类的具体用法?Java Runner怎么用?Java Runner使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
Runner类属于com.google.caliper包,在下文中一共展示了Runner类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: run
import com.google.caliper.Runner; //导入依赖的package包/类
public boolean run(String actionName, Profiler profiler,
String[] args) {
monitor.outcomeStarted(this, testClass.getName(), actionName);
String[] arguments = ObjectArrays.concat(testClass.getName(), args);
if (profile) {
arguments = ObjectArrays.concat("--debug", arguments);
}
try {
if (profiler != null) {
profiler.start();
}
new Runner().run(arguments);
} catch (Exception ex) {
ex.printStackTrace();
} finally {
if (profiler != null) {
profiler.stop();
}
}
monitor.outcomeFinished(Result.SUCCESS);
return true;
}
示例2: publish
import com.google.caliper.Runner; //导入依赖的package包/类
/**
* Publish result on http://microbenchmarks.appspot.com
*/
public static void publish(final Result result) throws Exception {
final Runner runner = new Runner();
final Method method = runner.getClass().getDeclaredMethod(
"postResults", Result.class);
method.setAccessible(true);
method.invoke(runner, result);
}
示例3: main
import com.google.caliper.Runner; //导入依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
Runner.main(SimpleMapTest.class, args);
}
示例4: main
import com.google.caliper.Runner; //导入依赖的package包/类
/**
* @param args
*/
public static void main(String[] args) {
Runner.main(CaliperTest.class, args);
}
示例5: runBenchmarks
import com.google.caliper.Runner; //导入依赖的package包/类
@Test
public void runBenchmarks() throws Exception {
File me = new File(DefaultBenchmark.class.getResource(
'/' + DefaultBenchmark.class.getName().replace('.', '/') + ".class").getPath());
if (!me.exists()) {
fail("failed to determine the project path");
}
File buildDir =
me.getParentFile().getParentFile().getParentFile().getParentFile().getParentFile().getParentFile();
if (!buildDir.getPath().endsWith(File.separator + "target") || !buildDir.isDirectory()) {
fail("failed to locate the build directory");
}
File reportDir = new File(buildDir.getAbsolutePath() + File.separator + "caliper-reports");
if (!reportDir.exists()) {
if (!reportDir.mkdirs()) {
fail("failed to create the Caliper report directory: " + reportDir.getAbsolutePath());
}
}
if (!reportDir.isDirectory()) {
fail("not a directory: " + reportDir.getAbsolutePath());
}
boolean deleted = deleteOldReports(reportDir);
if (!warned) {
CaliperRc caliperrc = CaliperRc.INSTANCE;
if (caliperrc.getApiKey() == null || caliperrc.getPostUrl() == null) {
warned = true;
System.out.println();
System.out.println(" Cannot read the configuration properties from .caliperrc.");
System.out.println(" Please follow the instructions at:");
System.out.println();
System.out.println(" * http://code.google.com/p/caliper/wiki/OnlineResults");
System.out.println();
System.out.println(" to upload and browse the benchmark results.");
}
}
if (deleted || warned) {
// Insert a pretty newline.
System.out.println();
}
new Runner().run(
"--trials", String.valueOf(trials),
"--warmupMillis", String.valueOf(warmupMillis),
"--runMillis", String.valueOf(runMillis),
"--saveResults", reportDir.getAbsolutePath(),
"--captureVmLog",
getClass().getName());
}
示例6: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+ imgWidth +" x "+ imgHeight +" ==========");
Runner.main(BenchmarkSurfDescribeOps.class, args);
}
示例7: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+ imgWidth +" x "+ imgHeight +" ==========");
Runner.main(BenchmarkConvolveDown.class, args);
}
示例8: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+ imgWidth +" x "+ imgHeight +" ==========");
Runner.main(BenchmarkConvolveMean.class, args);
}
示例9: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+ width +" x "+ height +" ==========");
Runner.main(BenchmarkConvolveMean.class, args);
}
示例10: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+ width +" x "+ height +" ==========");
Runner.main(BenchmarkConvolve.class, args);
}
示例11: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
Runner.main(BenchmarkConvolveBox.class, args);
}
示例12: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+ imgWidth +" x "+ imgHeight +" ==========");
Runner.main(BenchmarkConvolveDownNormalized.class, args);
}
示例13: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
System.out.println("========= Profile Image Size "+imgWidth+" x "+imgHeight+" ==========");
System.out.println();
Runner.main(BenchmarkMedianFilter.class, args);
}
示例14: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main(String args[]) {
System.out.println("========= Profile Image Size " + imgWidth + " x " + imgHeight + " ==========");
Runner.main(BenchmarkBinaryOps.class, args);
}
示例15: main
import com.google.caliper.Runner; //导入依赖的package包/类
public static void main(String[] args) {
Runner.main(VectorDotProducts.class, args);
}