use of org.openjdk.jmh.runner.options.OptionsBuilder in project hive by apache.
the class MapJoinOneLongKeyBench method main.
// -----------------------------------------------------------------------------------------------
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder().include(".*" + MapJoinOneLongKeyBench.class.getSimpleName() + ".*").build();
new Runner(opt).run();
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project hive by apache.
the class VectorSelectOperatorBench 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 VectorSelectOperatorBench -prof perf -f 1 (Linux)
* $ java -jar target/benchmarks.jar VectorSelectOperatorBench -prof perfnorm -f 3 (Linux)
* $ java -jar target/benchmarks.jar VectorSelectOperatorBench -prof perfasm -f 1 (Linux)
* $ java -jar target/benchmarks.jar VectorSelectOperatorBench -prof gc -f 1 (allocation counting via gc)
*/
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder().include(VectorSelectOperatorBench.class.getSimpleName()).addProfiler(LinuxPerfProfiler.class).addProfiler(LinuxPerfNormProfiler.class).addProfiler(LinuxPerfAsmProfiler.class).build();
new Runner(opt).run();
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project grakn by graknlabs.
the class BenchmarkTest method newOptionsBuilder.
private ChainedOptionsBuilder newOptionsBuilder() throws Exception {
String className = getClass().getSimpleName();
ChainedOptionsBuilder runnerOptions = new OptionsBuilder().include(".*" + className + ".*").detectJvmArgs();
// We have to pass system properties into the child JVM
// TODO: This should probably not be necessary
List<String> jvmArgs = new ArrayList<>();
for (GraknSystemProperty property : GraknSystemProperty.values()) {
String value = property.value();
if (value != null) {
jvmArgs.add("-D" + property.key() + "=" + value);
}
}
runnerOptions.jvmArgsAppend(jvmArgs.toArray(new String[jvmArgs.size()]));
if (getWarmupIterations() > 0) {
runnerOptions.warmupIterations(getWarmupIterations());
}
if (getMeasureIterations() > 0) {
runnerOptions.measurementIterations(getMeasureIterations());
}
if (getReportDir() != null) {
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;
}
use of org.openjdk.jmh.runner.options.OptionsBuilder 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;
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project jersey by jersey.
the class JacksonBenchmark method main.
public static void main(final String[] args) throws Exception {
final Options opt = new OptionsBuilder().include(JacksonBenchmark.class.getSimpleName()).build();
new Runner(opt).run();
}
Aggregations