Search in sources :

Example 1 with Mode

use of org.openjdk.jmh.annotations.Mode in project ignite by apache.

the class JmhIdeBenchmarkRunner method optionsBuilder.

/**
     * Get prepared options builder.
     *
     * @return Options builder.
     */
public OptionsBuilder optionsBuilder() {
    OptionsBuilder builder = new OptionsBuilder();
    builder.forks(forks);
    builder.warmupIterations(warmupIterations);
    builder.measurementIterations(measurementIterations);
    builder.timeUnit(outputTimeUnit);
    builder.threads(threads);
    if (benchmarkModes != null) {
        for (Mode benchmarkMode : benchmarkModes) builder.getBenchModes().add(benchmarkMode);
    }
    if (benchmarks != null) {
        for (Object benchmark : benchmarks) {
            if (benchmark instanceof Class)
                builder.include(((Class) benchmark).getSimpleName());
            else
                builder.include(benchmark.toString());
        }
    }
    if (jvmArgs != null)
        builder.jvmArgs(jvmArgs);
    if (output != null)
        builder.output(output);
    if (profilers != null) {
        for (Class profiler : profilers) builder.addProfiler(profiler);
    }
    return builder;
}
Also used : Mode(org.openjdk.jmh.annotations.Mode) OptionsBuilder(org.openjdk.jmh.runner.options.OptionsBuilder)

Aggregations

Mode (org.openjdk.jmh.annotations.Mode)1 OptionsBuilder (org.openjdk.jmh.runner.options.OptionsBuilder)1