use of org.openjdk.jmh.runner.options.OptionsBuilder in project jersey by jersey.
the class ClientBenchmark method main.
public static void main(final String[] args) throws Exception {
final Options opt = new OptionsBuilder().include(ClientBenchmark.class.getSimpleName()).build();
new Runner(opt).run();
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project javaslang by javaslang.
the class JmhRunner method run.
private static Array<RunResult> run(int warmupIterations, int measurementIterations, int millis, ForkJvm forkJvm, VerboseMode verboseMode, Assertions assertions, PrintInlining printInlining, Array<String> classNames, Array<String> includeNames) {
try {
final ChainedOptionsBuilder builder = new OptionsBuilder().shouldDoGC(true).verbosity(verboseMode).shouldFailOnError(true).mode(Mode.Throughput).timeUnit(TimeUnit.SECONDS).warmupTime(TimeValue.milliseconds(millis)).warmupIterations(warmupIterations).measurementTime(TimeValue.milliseconds(millis)).measurementIterations(measurementIterations).forks(forkJvm.forkCount).jvmArgsAppend("-XX:+UseG1GC", "-Xss100m", "-Xms4g", "-Xmx4g", "-XX:MaxGCPauseMillis=1000", "-XX:+UnlockExperimentalVMOptions", "-XX:G1NewSizePercent=100", "-XX:G1MaxNewSizePercent=100", assertions.vmArg);
final String includePattern = includeNames.mkString("\\..*?\\b(", "|", ")_");
classNames.forEach(name -> builder.include(name + includePattern));
if (printInlining == PrintInlining.ENABLE) {
builder.jvmArgsAppend("-XX:+UnlockDiagnosticVMOptions", "-XX:+PrintInlining");
/* might help in deciding when the JVM is properly warmed up - or where to optimize the code */
}
return Array.ofAll(new Runner(builder.build()).run());
} catch (RunnerException e) {
throw new RuntimeException(e);
}
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project pinot by linkedin.
the class BenchmarkFileRead method main.
/* @Benchmark
@BenchmarkMode({Mode.SampleTime})
@OutputTimeUnit(TimeUnit.MILLISECONDS)
public void readUnpacks() {
int rows = 25000000;
int columnSizeInBits = 3;
boolean isMMap = false;
boolean hasNulls = false;
int output[] = new int[rows];
final int outputBytes = MathUtils.lcm(32, columnSizeInBits) / columnSizeInBits;
final int inputBytes = MathUtils.lcm(32, columnSizeInBits) / 32;
int destPos = 0;
int inPos = 0;
byteBuffer.rewind();
int[] input = new int[length / 4];
byteBuffer.asIntBuffer().get(input);
for (int i = 0; i < (length / 4) / inputBytes; i++) {
BitPacking.fastunpack(input, inPos, output, destPos, columnSizeInBits);
destPos += outputBytes;
inPos += inputBytes;
}
}*/
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder().include(BenchmarkFileRead.class.getSimpleName()).forks(1).build();
new Runner(opt).run();
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project pinot by linkedin.
the class BenchmarkFileWrite method main.
public static void main(String[] args) throws Exception {
Options opt = new OptionsBuilder().include(BenchmarkFileWrite.class.getSimpleName()).forks(1).build();
new Runner(opt).run();
}
use of org.openjdk.jmh.runner.options.OptionsBuilder in project pinot by linkedin.
the class BenchmarkQueryEngine method main.
public static void main(String[] args) throws Exception {
ChainedOptionsBuilder opt = new OptionsBuilder().include(BenchmarkQueryEngine.class.getSimpleName()).warmupTime(TimeValue.seconds(30)).warmupIterations(4).measurementTime(TimeValue.seconds(30)).measurementIterations(20);
if (ENABLE_PROFILING) {
opt = opt.addProfiler(StackProfiler.class, "excludePackages=true;excludePackageNames=sun.,java.net.,io.netty.,org.apache.zookeeper.,org.eclipse.jetty.;lines=5;period=1;top=20");
}
new Runner(opt.build()).run();
}
Aggregations