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


Java Runner类代码示例

本文整理汇总了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;
}
 
开发者ID:dryganets,项目名称:vogar,代码行数:23,代码来源:CaliperRunner.java

示例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);
}
 
开发者ID:wuyinxian124,项目名称:netty4.0.27Learn,代码行数:11,代码来源:CaliperRunner.java

示例3: main

import com.google.caliper.Runner; //导入依赖的package包/类
/**
 * @param args
 */
public static void main(String[] args) {
    Runner.main(SimpleMapTest.class, args);
}
 
开发者ID:Morgan-Stanley,项目名称:SilverKing,代码行数:7,代码来源:SimpleMapTest.java

示例4: main

import com.google.caliper.Runner; //导入依赖的package包/类
/**
 * @param args
 */
public static void main(String[] args) {
    Runner.main(CaliperTest.class, args);
}
 
开发者ID:Morgan-Stanley,项目名称:SilverKing,代码行数:7,代码来源:CaliperTest.java

示例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());
}
 
开发者ID:kyle-liu,项目名称:netty4study,代码行数:58,代码来源:DefaultBenchmark.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkSurfDescribeOps.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkConvolveDown.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkConvolveNormalizeEdge.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkConvolveMean.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkConvolve.java

示例11: main

import com.google.caliper.Runner; //导入依赖的package包/类
public static void main( String args[] ) {
	Runner.main(BenchmarkConvolveBox.class, args);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:4,代码来源:BenchmarkConvolveBox.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkConvolveDownNormalized.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:7,代码来源:BenchmarkMedianFilter.java

示例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);
}
 
开发者ID:intrack,项目名称:BoofCV-master,代码行数:6,代码来源:BenchmarkBinaryOps.java

示例15: main

import com.google.caliper.Runner; //导入依赖的package包/类
public static void main(String[] args) {    
    Runner.main(VectorDotProducts.class, args);
}
 
开发者ID:Adopt-a-JSR,项目名称:java-8-benchmarks,代码行数:4,代码来源:VectorDotProducts.java


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