Search in sources :

Example 76 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project poi by apache.

the class AddImageBench method main.

public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder().include(".*" + AddImageBench.class.getSimpleName() + ".*").addProfiler(StackProfiler.class).addProfiler(GCProfiler.class).forks(1).build();
    new Runner(opt).run();
}
Also used : Options(org.openjdk.jmh.runner.options.Options) Runner(org.openjdk.jmh.runner.Runner) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder) StackProfiler(org.openjdk.jmh.profile.StackProfiler)

Example 77 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project hive by apache.

the class MapJoinOneStringKeyBench method main.

// -----------------------------------------------------------------------------------------------
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder().include(".*" + MapJoinOneStringKeyBench.class.getSimpleName() + ".*").build();
    new Runner(opt).run();
}
Also used : Options(org.openjdk.jmh.runner.options.Options) Runner(org.openjdk.jmh.runner.Runner) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder)

Example 78 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project hive by apache.

the class VectorGroupByOperatorBench method main.

/*
   * ============================== HOW TO RUN THIS TEST: ====================================
   *
   * You can run this test:
   *
   * a) Via the command line:
   *    $ mvn clean install
   *    $ java -jar target/benchmarks.jar VectorGroupByOperatorCountBench -prof perf     -f 1 (Linux)
   *    $ java -jar target/benchmarks.jar VectorGroupByOperatorCountBench -prof perfnorm -f 3 (Linux)
   *    $ java -jar target/benchmarks.jar VectorGroupByOperatorCountBench -prof perfasm  -f 1 (Linux)
   *    $ java -jar target/benchmarks.jar VectorGroupByOperatorCountBench -prof gc  -f 1 (allocation counting via gc)
   *    $ java -jar target/benchmarks.jar VectorGroupByOperatorBench -p hasNulls=true -p isRepeating=false -p aggregation=bloom_filter  -p processMode=HASH -p evalMode=PARTIAL1
   *    $ java -agentlib:jdwp=transport=dt_socket,address=127.0.0.1:6006,suspend=y,server=y -jar target/benchmarks.jar VectorGroupByOperatorBench
   */
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder().include(VectorGroupByOperatorBench.class.getSimpleName()).addProfiler(LinuxPerfProfiler.class).addProfiler(LinuxPerfNormProfiler.class).addProfiler(LinuxPerfAsmProfiler.class).build();
    new Runner(opt).run();
}
Also used : Options(org.openjdk.jmh.runner.options.Options) Runner(org.openjdk.jmh.runner.Runner) LinuxPerfProfiler(org.openjdk.jmh.profile.LinuxPerfProfiler) LinuxPerfAsmProfiler(org.openjdk.jmh.profile.LinuxPerfAsmProfiler) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder)

Example 79 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project ignite by apache.

the class JmhCacheLocksBenchmark method main.

/**
 * Run benchmarks.
 *
 * @param args Arguments.
 * @throws Exception If failed.
 */
public static void main(String[] args) throws Exception {
    final String simpleClsName = JmhCacheLocksBenchmark.class.getSimpleName();
    final int threads = 4;
    final boolean client = true;
    final CacheAtomicityMode atomicityMode = CacheAtomicityMode.TRANSACTIONAL;
    final CacheWriteSynchronizationMode writeSyncMode = CacheWriteSynchronizationMode.FULL_SYNC;
    final String output = simpleClsName + "-" + threads + "-threads" + "-" + (client ? "client" : "data") + "-" + atomicityMode + "-" + writeSyncMode;
    final Options opt = new OptionsBuilder().threads(threads).include(simpleClsName).output(output + ".jmh.log").jvmArgs("-Xms1g", "-Xmx1g", "-XX:+UnlockCommercialFeatures", JmhIdeBenchmarkRunner.createProperty(PROP_ATOMICITY_MODE, atomicityMode), JmhIdeBenchmarkRunner.createProperty(PROP_WRITE_SYNC_MODE, writeSyncMode), JmhIdeBenchmarkRunner.createProperty(PROP_DATA_NODES, 4), JmhIdeBenchmarkRunner.createProperty(PROP_CLIENT_MODE, client)).build();
    new Runner(opt).run();
}
Also used : Options(org.openjdk.jmh.runner.options.Options) JmhIdeBenchmarkRunner(org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner) Runner(org.openjdk.jmh.runner.Runner) CacheWriteSynchronizationMode(org.apache.ignite.cache.CacheWriteSynchronizationMode) CacheAtomicityMode(org.apache.ignite.cache.CacheAtomicityMode) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder)

Example 80 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project ignite by apache.

the class JmhWaitStategyBenchmark method main.

/**
 * Benchmark runner
 */
public static void main(String[] args) throws RunnerException {
    List<String> policies = Arrays.asList("inc", "dec", "r25", "r50", "r75");
    int[] threads = { 2, 4, 8, 16, 32 };
    List<RunResult> results = new ArrayList<>();
    for (String policy : policies) {
        for (int thread : threads) {
            ChainedOptionsBuilder builder = new OptionsBuilder().jvmArgs().timeUnit(TimeUnit.MILLISECONDS).measurementIterations(10).measurementTime(TimeValue.seconds(20)).warmupIterations(5).warmupTime(TimeValue.seconds(10)).jvmArgs("-Dbench.exp.policy=" + policy).forks(1).threads(thread).mode(Mode.Throughput).include(JmhWaitStategyBenchmark.class.getSimpleName());
            results.addAll(new Runner(builder.build()).run());
        }
    }
    for (RunResult result : results) {
        BenchmarkParams params = result.getParams();
        Collection<String> args1 = params.getJvmArgs();
        for (String s : args1) {
            System.out.print(s.substring(s.length() - 3, s.length()));
            System.out.print(" x ");
        }
        System.out.print(params.getThreads());
        System.out.print("\t\t");
        System.out.println(result.getPrimaryResult().toString());
    }
}
Also used : Runner(org.openjdk.jmh.runner.Runner) ChainedOptionsBuilder(org.openjdk.jmh.runner.options.ChainedOptionsBuilder) ArrayList(java.util.ArrayList) ChainedOptionsBuilder(org.openjdk.jmh.runner.options.ChainedOptionsBuilder) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder) RunResult(org.openjdk.jmh.results.RunResult) BenchmarkParams(org.openjdk.jmh.infra.BenchmarkParams)

Aggregations

OptionsBuilder (org.openjdk.jmh.runner.options.OptionsBuilder)84 Runner (org.openjdk.jmh.runner.Runner)79 Options (org.openjdk.jmh.runner.options.Options)76 StackProfiler (org.openjdk.jmh.profile.StackProfiler)7 ChainedOptionsBuilder (org.openjdk.jmh.runner.options.ChainedOptionsBuilder)7 File (java.io.File)3 RunResult (org.openjdk.jmh.results.RunResult)3 ArrayList (java.util.ArrayList)2 GCProfiler (org.openjdk.jmh.profile.GCProfiler)2 LinuxPerfAsmProfiler (org.openjdk.jmh.profile.LinuxPerfAsmProfiler)2 LinuxPerfProfiler (org.openjdk.jmh.profile.LinuxPerfProfiler)2 GraknSystemProperty (ai.grakn.GraknSystemProperty)1 CacheAtomicityMode (org.apache.ignite.cache.CacheAtomicityMode)1 CacheWriteSynchronizationMode (org.apache.ignite.cache.CacheWriteSynchronizationMode)1 JmhIdeBenchmarkRunner (org.apache.ignite.internal.benchmarks.jmh.runner.JmhIdeBenchmarkRunner)1 Mode (org.openjdk.jmh.annotations.Mode)1 BenchmarkParams (org.openjdk.jmh.infra.BenchmarkParams)1 Result (org.openjdk.jmh.results.Result)1 RunnerException (org.openjdk.jmh.runner.RunnerException)1 Statistics (org.openjdk.jmh.util.Statistics)1