io.netty.util.ResourceLeakDetector.Level#org.openjdk.jmh.runner.options.OptionsBuilder源码实例Demo

下面列出了io.netty.util.ResourceLeakDetector.Level#org.openjdk.jmh.runner.options.OptionsBuilder 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

源代码1 项目: conf4j   文件: PerformanceBenchmarkTest.java
@Test
public void launchBenchmark() throws Exception {
    Options opt = new OptionsBuilder()
            .include(this.getClass().getName() + ".*")
            .mode(Mode.SampleTime)
            .timeUnit(TimeUnit.MICROSECONDS)
            .warmupIterations(1)
            .warmupTime(TimeValue.seconds(1))
            .measurementIterations(1)
            .measurementTime(TimeValue.seconds(5))
            .threads(2)
            .forks(0)
            .syncIterations(true)
            .shouldFailOnError(true)
            .shouldDoGC(false)
            .jvmArgs("-Xms1G", "-Xmx1G", "-XX:MaxGCPauseMillis=10", "-XX:GCPauseIntervalMillis=100")
            .build();
    new Runner(opt).run();
}
 
源代码2 项目: yare   文件: AbstractPerformanceTest.java
@Test
public void runBenchmarks() throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(this.getClass().getSimpleName())
            .mode(Mode.AverageTime)
            .timeUnit(MILLISECONDS)
            .warmupIterations(2)
            .warmupTime(TimeValue.seconds(2))
            .measurementIterations(10)
            .measurementTime(TimeValue.seconds(2))
            .threads(1)
            .warmupForks(0)
            .forks(1)
            .shouldFailOnError(true)
            .shouldDoGC(true)
            .result("benchmarks/performance-results.csv")
            .resultFormat(ResultFormatType.CSV)
            .jvmArgs("-server", "-Xms2048M", "-Xmx2048M", "-XX:+UseG1GC")
            .build();
    new Runner(opt).run();
}
 
源代码3 项目: datakernel   文件: DkDirectScopebindBenchmark.java
public static void main(String[] args) throws RunnerException {
	System.out.println("Running benchmark with specialization " + (SPECIALIZE ? "ON" : "OFF"));

	Options opt = new OptionsBuilder()
			.include(DkDirectScopebindBenchmark.class.getSimpleName())
			.forks(2)
			.warmupIterations(3)
			.warmupTime(TimeValue.seconds(1L))
			.measurementIterations(10)
			.measurementTime(TimeValue.seconds(2L))
			.mode(Mode.AverageTime)
			.timeUnit(TimeUnit.NANOSECONDS)
			.build();

	new Runner(opt).run();
}
 
源代码4 项目: rpc-benchmark   文件: Client.java
public static void main(String[] args) throws Exception {
	Client client = new Client();

	for (int i = 0; i < 60; i++) {
		try {
			System.out.println(client.getUser());
			break;
		} catch (Exception e) {
			Thread.sleep(1000);
		}
	}

	client.close();

	Options opt = new OptionsBuilder()//
			.include(Client.class.getSimpleName())//
			.warmupIterations(3)//
			.warmupTime(TimeValue.seconds(10))//
			.measurementIterations(3)//
			.measurementTime(TimeValue.seconds(10))//
			.threads(CONCURRENCY)//
			.forks(1)//
			.build();

	new Runner(opt).run();
}
 
源代码5 项目: questdb   文件: LogBenchmark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(LogBenchmark.class.getSimpleName())
            .warmupIterations(5)
            .measurementIterations(5)
            .addProfiler("gc")
            .forks(1)
            .build();

    new Runner(opt).run();
}
 
源代码6 项目: metrics   文件: MeterBenchMark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(".*" + MeterBenchMark.class.getSimpleName() + ".*")
            .warmupIterations(3)
            .measurementIterations(5)
            .threads(32)
            .forks(1)
            .build();

    new Runner(opt).run();
}
 
源代码7 项目: preDict   文件: OriginalSymSpellBenchmark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(OriginalSymSpellBenchmark.class.getSimpleName())
            .warmupIterations(5)
            .measurementIterations(5)
            .forks(1)
            .build();

    new Runner(opt).run();

}
 
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(".*" + MessageBufferBenchmarks_PutPeekTake.class.getSimpleName() + ".*")
            .threads(40)
            .build();

    new Runner(opt).run();
}
 
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(GarmadonSerializationRegistryBenchmark.class.getSimpleName())
            .build();

    new Runner(opt).run();
}
 
源代码10 项目: presto   文件: BenchmarkDecimalAggregation.java
public static void main(String[] args)
        throws RunnerException
{
    Options options = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .include(".*" + BenchmarkDecimalAggregation.class.getSimpleName() + ".*")
            .build();

    new Runner(options).run();
}
 
源代码11 项目: presto   文件: BenchmarkCPUCounters.java
public static void main(String[] args)
        throws RunnerException
{
    Options options = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .threads(getInteger("threads", 1))
            .include(".*" + BenchmarkCPUCounters.class.getSimpleName() + ".*")
            .build();

    new Runner(options).run();
}
 
public static void main(String[] args)
		throws RunnerException {
	Options options = new OptionsBuilder()
			.verbosity(VerboseMode.NORMAL)
			.include(".*" + StreamNetworkThroughputBenchmarkExecutor.class.getCanonicalName() + ".*")
			.build();

	new Runner(options).run();
}
 
源代码13 项目: netty-4.1.22   文件: AbstractMicrobenchmarkBase.java
protected ChainedOptionsBuilder newOptionsBuilder() throws Exception {
    String className = getClass().getSimpleName();

    ChainedOptionsBuilder runnerOptions = new OptionsBuilder()
        .include(".*" + className + ".*")
        .jvmArgs(jvmArgs());

    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;
}
 
源代码14 项目: presto   文件: BenchmarkOrcDecimalReader.java
public static void main(String[] args)
        throws Exception
{
    // assure the benchmarks are valid before running
    BenchmarkData data = new BenchmarkData();
    data.setup();
    new BenchmarkOrcDecimalReader().readDecimal(data);

    Options options = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .include(".*" + BenchmarkOrcDecimalReader.class.getSimpleName() + ".*")
            .build();
    new Runner(options).run();
}
 
源代码15 项目: jmh-playground   文件: JMHSample_24_Inheritance.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(JMHSample_24_Inheritance.class.getSimpleName())
            .build();

    new Runner(opt).run();
}
 
public static void main(String[] args) throws Exception {
	new Runner(
		new OptionsBuilder()
			.include(PooledComponentBenchmark.class.getName() + ".*")
			.param("entityCount", "1024", "4096")
			.build())
	.run();
}
 
源代码17 项目: rpc-benchmark   文件: Client.java
public static void main(String[] args) throws RunnerException {
	Options opt = new OptionsBuilder()//
			.include(Client.class.getSimpleName())//
			.warmupIterations(3)//
			.warmupTime(TimeValue.seconds(10))//
			.measurementIterations(3)//
			.measurementTime(TimeValue.seconds(10))//
			.threads(CONCURRENCY)//
			.forks(1)//
			.build();

	new Runner(opt).run();
}
 
public static void main(String[] args)
        throws RunnerException
{
    Options options = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .include(".*" + BenchmarkScanFilterAndProjectOperator.class.getSimpleName() + ".*")
            .build();

    new Runner(options).run();
}
 
public static void main(String[] args)
        throws RunnerException
{
    Options options = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .include(".*" + BenchmarkHashBuildAndJoinOperators.class.getSimpleName() + ".*")
            .build();

    new Runner(options).run();
}
 
源代码20 项目: t-digest   文件: ApproxLogBench.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(ApproxLogBench.class.getSimpleName())
            .warmupIterations(5)
            .measurementIterations(5)
            .forks(1)
            .resultFormat(ResultFormatType.CSV)
            .build();

    new Runner(opt).run();
}
 
源代码21 项目: questdb   文件: ColumnSizeLookup.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(ColumnSizeLookup.class.getSimpleName())
            .warmupIterations(5)
            .measurementIterations(5)
            .forks(1)
            .build();

    new Runner(opt).run();
}
 
源代码22 项目: sofa-jraft   文件: RawKVGetBenchmark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder() //
        .include(RawKVGetBenchmark.class.getSimpleName()) //
        .warmupIterations(1) //
        .warmupTime(TimeValue.seconds(10)) //
        .measurementIterations(3) //
        .measurementTime(TimeValue.seconds(10)) //
        .threads(CONCURRENCY) //
        .forks(1) //
        .build();

    new Runner(opt).run();
}
 
源代码23 项目: SpringBootBucket   文件: SecondBenchmark.java
public static void main(String[] args) throws Exception {
    Options opt = new OptionsBuilder()
            .include(SecondBenchmark.class.getSimpleName())
            .forks(1)
            .warmupIterations(5)
            .measurementIterations(2)
            .build();
    Collection<RunResult> results =  new Runner(opt).run();
    ResultExporter.exportResult("单线程与多线程求和性能", results, "length", "微秒");
}
 
源代码24 项目: flink-benchmarks   文件: ListStateBenchmark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .include(".*" + ListStateBenchmark.class.getCanonicalName() + ".*")
            .build();

    new Runner(opt).run();
}
 
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(((Class) SmoothlyDecayingRollingCounterBenchmark.class).getSimpleName())
            .warmupIterations(5)
            .measurementIterations(5)
            .threads(4)
            .forks(1)
            .build();
    try {
        new Runner(opt).run();
    } catch (RunnerException e) {
        throw new RuntimeException(e);
    }
}
 
源代码26 项目: SpringBootBucket   文件: FirstBenchmark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(FirstBenchmark.class.getSimpleName())
            .forks(1)
            .warmupIterations(5)
            .measurementIterations(5)
            .build();
    new Runner(opt).run();
}
 
源代码27 项目: brave   文件: SparkBenchmarks.java
public static void main(String[] args) throws RunnerException {
  Options opt = new OptionsBuilder()
    .include(".*" + SparkBenchmarks.class.getSimpleName() + ".*")
    .build();

  new Runner(opt).run();
}
 
源代码28 项目: micrometer   文件: MeterRegistrationBenchmark.java
public static void main(String[] args) throws RunnerException {
    Options opt = new OptionsBuilder()
            .include(MeterRegistrationBenchmark.class.getSimpleName())
            .warmupIterations(2)
            .measurementIterations(5)
            .mode(Mode.SampleTime)
            .timeUnit(TimeUnit.SECONDS)
            .forks(1)
            .build();

    new Runner(opt).run();
}
 
源代码29 项目: tutorials   文件: PrimeNumbersUnitManualTest.java
@Test
public void givenPrimesCalculated_whenUsingPoolsAndOneThread_thenOneThreadSlowest() {
    Options opt = new OptionsBuilder()
      .include(Benchmarker.class.getSimpleName())
      .forks(1)
      .build();

    try {
        new Runner(opt).run();
    } catch (RunnerException e) {
        fail();
    }
}
 
源代码30 项目: presto   文件: BenchmarkStringFunctions.java
public static void main(String[] args)
        throws RunnerException
{
    Options options = new OptionsBuilder()
            .verbosity(VerboseMode.NORMAL)
            .include(".*" + BenchmarkStringFunctions.class.getSimpleName() + ".*")
            .build();

    new Runner(options).run();
}