Search in sources :

Example 41 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project presto by prestodb.

the class BenchmarkDecimalOperators method main.

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

Example 42 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project metrics by dropwizard.

the class MeterBenchmark method main.

public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder().include(".*" + MeterBenchmark.class.getSimpleName() + ".*").warmupIterations(3).measurementIterations(5).threads(4).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)

Example 43 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project spring-data-mongodb by spring-projects.

the class AbstractMicrobenchmark method options.

/**
 * Collect all options for the {@link Runner}.
 *
 * @param includes regex for matching benchmarks to be included in the run.
 * @return never {@literal null}.
 * @throws Exception
 */
protected ChainedOptionsBuilder options(String includes) throws Exception {
    ChainedOptionsBuilder optionsBuilder = new OptionsBuilder().include(includes).jvmArgs(jvmArgs());
    optionsBuilder = warmup(optionsBuilder);
    optionsBuilder = measure(optionsBuilder);
    optionsBuilder = forks(optionsBuilder);
    optionsBuilder = report(optionsBuilder);
    return optionsBuilder;
}
Also used : ChainedOptionsBuilder(org.openjdk.jmh.runner.options.ChainedOptionsBuilder) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder) ChainedOptionsBuilder(org.openjdk.jmh.runner.options.ChainedOptionsBuilder)

Example 44 with OptionsBuilder

use of org.openjdk.jmh.runner.options.OptionsBuilder in project Chronicle-Queue by OpenHFT.

the class ChronicleQueueMicrobench method newOptionsBuilder.

// *************************************************************************
// 
// *************************************************************************
private ChainedOptionsBuilder newOptionsBuilder() {
    String className = getClass().getSimpleName();
    final ChainedOptionsBuilder runnerOptions = new OptionsBuilder().include(".*" + className + ".*").jvmArgs(BASE_JVM_ARGS).jvmArgsAppend(jvmArgs());
    if (getWarmupIterations() > 0) {
        runnerOptions.warmupIterations(getWarmupIterations());
    }
    if (getMeasureIterations() > 0) {
        runnerOptions.measurementIterations(getMeasureIterations());
    }
    if (null != getReportDir()) {
        String filePath = getReportDir() + className + ".json";
        File file = new File(filePath);
        if (file.exists()) {
            file.delete();
        } else {
            file.getParentFile().mkdirs();
        // file.createNewFile();
        }
        runnerOptions.resultFormat(ResultFormatType.JSON);
        runnerOptions.result(filePath);
    }
    return runnerOptions;
}
Also used : ChainedOptionsBuilder(org.openjdk.jmh.runner.options.ChainedOptionsBuilder) File(java.io.File) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder) ChainedOptionsBuilder(org.openjdk.jmh.runner.options.ChainedOptionsBuilder)

Example 45 with OptionsBuilder

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

the class MapJoinMultiKeyBench method main.

// -----------------------------------------------------------------------------------------------
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder().include(".*" + MapJoinMultiKeyBench.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)

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