Java Code Examples for org.openjdk.jmh.profile.StackProfiler

The following examples show how to use org.openjdk.jmh.profile.StackProfiler. These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source Project: FHIR   Source File: FHIRBenchmarkRunner.java    License: Apache License 2.0 6 votes vote down vote up
/**
     * Run without overriding any parameters
     */
    public Collection<RunResult> run() throws RunnerException {
        Options opt = new OptionsBuilder()
                .include(".*" + benchmarkClass.getSimpleName() + ".*")
                .jvmArgsPrepend("-Xms2g", "-Xmx2g")
                .jvmArgsAppend(properties.toArray(new String[properties.size()]))
                .verbosity(VerboseMode.NORMAL)
                .warmupIterations(1)
                .warmupTime(TimeValue.seconds(10))
                .measurementIterations(2)
                .measurementTime(TimeValue.seconds(10))
                .shouldDoGC(true)
                .forks(2)
                .threads(1)
//              .mode(Mode.AverageTime)
                .addProfiler(StackProfiler.class)
                .build();
        return new Runner(opt).run();
    }
 
Example 2
Source Project: FHIR   Source File: FHIRBenchmarkRunner.java    License: Apache License 2.0 6 votes vote down vote up
/**
     * Run and override the 'exampleName' param with the passed fileName
     */
    public Collection<RunResult> run(String fileName) throws RunnerException {
        Options opt = new OptionsBuilder()
                .include(".*" + benchmarkClass.getSimpleName() + ".*")
                .jvmArgsPrepend("-Xms4g", "-Xmx4g")
                .jvmArgsAppend(properties.toArray(new String[properties.size()]))
                .verbosity(VerboseMode.NORMAL)
                .warmupIterations(1)
                .warmupTime(TimeValue.seconds(10))
                .measurementIterations(2)
                .measurementTime(TimeValue.seconds(10))
                .shouldDoGC(false)
                .forks(1)
//              .mode(Mode.AverageTime)
                .addProfiler(StackProfiler.class)
                .param("exampleName", fileName)
                .build();
        return new Runner(opt).run();
    }
 
Example 3
Source Project: hadoop-ozone   Source File: Genesis.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
  CommandLine commandLine = new CommandLine(new Genesis());
  commandLine.parse(args);
  if (commandLine.isUsageHelpRequested()) {
    commandLine.usage(System.out);
    return;
  }

  OptionsBuilder optionsBuilder = new OptionsBuilder();
  if (benchmarks != null) {
    // The OptionsBuilder#include takes a regular expression as argument.
    // Therefore it is important to keep the benchmark names unique for
    // running a benchmark. For example if there are two benchmarks -
    // BenchMarkOM and BenchMarkOMClient and we include BenchMarkOM then
    // both the benchmarks will be run.
    for (String benchmark : benchmarks) {
      optionsBuilder.include(benchmark);
    }
  }
  optionsBuilder.warmupIterations(2)
      .measurementIterations(20)
      .addProfiler(StackProfiler.class)
      .addProfiler(GCProfiler.class)
      .shouldDoGC(true)
      .forks(1)
      .threads(numThreads);

  if (seconds > 0) {
    optionsBuilder.measurementTime(seconds(seconds));
  }

  new Runner(optionsBuilder.build()).run();
}
 
Example 4
Source Project: jmh-playground   Source File: JMHSample_35_Profilers.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
            Options opt = new OptionsBuilder()
                    .include(JMHSample_35_Profilers.Maps.class.getSimpleName())
                    .addProfiler(StackProfiler.class)
//                    .addProfiler(GCProfiler.class)
                    .build();

            new Runner(opt).run();
        }
 
Example 5
Source Project: aws-sdk-java-v2   Source File: XmlProtocolBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    Options opt = new OptionsBuilder()
        .include(XmlProtocolBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    new Runner(opt).run();
}
 
Example 6
Source Project: aws-sdk-java-v2   Source File: QueryProtocolBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    Options opt = new OptionsBuilder()
        .include(QueryProtocolBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    new Runner(opt).run();
}
 
Example 7
Source Project: aws-sdk-java-v2   Source File: Ec2ProtocolBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    Options opt = new OptionsBuilder()
        .include(Ec2ProtocolBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    new Runner(opt).run();
}
 
Example 8
Source Project: aws-sdk-java-v2   Source File: JsonProtocolBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {
    Options opt = new OptionsBuilder()
        .include(JsonProtocolBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    new Runner(opt).run();
}
 
Example 9
Source Project: aws-sdk-java-v2   Source File: ApacheHttpClientBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String... args) throws Exception {

        Options opt = new OptionsBuilder()
            .include(ApacheHttpClientBenchmark.class.getSimpleName() + ".concurrentApiCall")
            .addProfiler(StackProfiler.class)
            .build();
        Collection<RunResult> run = new Runner(opt).run();
    }
 
Example 10
public static void main(String... args) throws Exception {

        Options opt = new OptionsBuilder()
            .include(UrlConnectionHttpClientBenchmark.class.getSimpleName())
            .addProfiler(StackProfiler.class)
            .build();
        Collection<RunResult> run = new Runner(opt).run();
    }
 
Example 11
public static void main(String... args) throws Exception {
    Options opt = new OptionsBuilder()
        .include(NettyClientH1NonTlsBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    Collection<RunResult> run = new Runner(opt).run();
}
 
Example 12
public static void main(String... args) throws Exception {
    Options opt = new OptionsBuilder()
        .include(NettyHttpClientH1Benchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    Collection<RunResult> run = new Runner(opt).run();
}
 
Example 13
public static void main(String... args) throws RunnerException, CommandLineOptionException {
    Options opt = new OptionsBuilder()
        .parent(new CommandLineOptions())
        .include(V2OptimizedClientCreationBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    Collection<RunResult> run = new Runner(opt).run();
}
 
Example 14
Source Project: aws-sdk-java-v2   Source File: V1ClientCreationBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String... args) throws RunnerException, CommandLineOptionException {
    Options opt = new OptionsBuilder()
        .parent(new CommandLineOptions())
        .include(V1ClientCreationBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    Collection<RunResult> run = new Runner(opt).run();
}
 
Example 15
public static void main(String... args) throws RunnerException, CommandLineOptionException {
    Options opt = new OptionsBuilder()
        .parent(new CommandLineOptions())
        .include(V2DefaultClientCreationBenchmark.class.getSimpleName())
        .addProfiler(StackProfiler.class)
        .build();
    Collection<RunResult> run = new Runner(opt).run();
}
 
Example 16
Source Project: datakernel   Source File: HttpUrlBenchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
	Options opt = new OptionsBuilder()
			.include(HttpUrlBenchmark.class.getSimpleName())
			.warmupIterations(3)
			.measurementIterations(5)
			.addProfiler(StackProfiler.class)
			.build();

	new Runner(opt).run();
}
 
Example 17
Source Project: incubator-pinot   Source File: BenchmarkQueryEngine.java    License: Apache License 2.0 5 votes vote down vote up
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();
}
 
Example 18
Source Project: t-digest   Source File: TDigestBench.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(".*" + TDigestBench.class.getSimpleName() + ".*")
            .resultFormat(ResultFormatType.CSV)
            .result("overall-results.csv")
            .addProfiler(GCProfiler.class)
            .addProfiler(StackProfiler.class)
            .build();

    new Runner(opt).run();
}
 
Example 19
Source Project: t-digest   Source File: Benchmark.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(".*" + Benchmark.class.getSimpleName() + ".*")
            .resultFormat(ResultFormatType.CSV)
            .result("results.csv")
            .addProfiler(GCProfiler.class)
            .addProfiler(StackProfiler.class)
            .build();

    new Runner(opt).run();
}
 
Example 20
Source Project: t-digest   Source File: MergeBench.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(MergeBench.class.getSimpleName())
            .warmupIterations(5)
            .measurementIterations(5)
            .forks(1)
            .resultFormat(ResultFormatType.CSV)
            .addProfiler(StackProfiler.class)
            .build();

    new Runner(opt).run();
}
 
Example 21
Source Project: t-digest   Source File: FloatHistogramBench.java    License: Apache License 2.0 5 votes vote down vote up
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(".*" + FloatHistogramBench.class.getSimpleName() + ".*")
            .resultFormat(ResultFormatType.CSV)
            .result("overall-results.csv")
            .addProfiler(StackProfiler.class)
            .addProfiler(GCProfiler.class)
            .build();

    new Runner(opt).run();
}