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;
}
Aggregations