本文整理汇总了Java中org.openjdk.jmh.runner.options.VerboseMode类的典型用法代码示例。如果您正苦于以下问题:Java VerboseMode类的具体用法?Java VerboseMode怎么用?Java VerboseMode使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VerboseMode类属于org.openjdk.jmh.runner.options包,在下文中一共展示了VerboseMode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args) throws RunnerException {
if(args.length != 1 || args[0] == null || args[0].isEmpty()) {
System.exit(1);
}
String testName = args[0];
Options opt = addTestToOptionsBuilder(new OptionsBuilder(), testName)
.forks(NO_FORKS_RUN_ON_THE_SAME_JVM)
// We need to avoid warmup iterations as they however counts towards total Postgres time
.warmupIterations(0)
.measurementIterations(ITERATIONS)
.timeUnit(TimeUnit.MILLISECONDS)
.mode(Mode.SingleShotTime)
.verbosity(VerboseMode.SILENT)
.build();
Collection<RunResult> runResults = new Runner(opt).run();
runResults.stream().forEach(runResult ->
System.out.printf(
"Java:\t%s\t%.2f\n",
runResult.getParams().getBenchmark(),
runResult.getPrimaryResult().getScore()
)
);
}
示例2: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws RunnerException
{
// assure the benchmarks are valid before running
BenchmarkData data = new BenchmarkData();
data.setup();
new BenchmarkGroupByHash().groupByHashPreCompute(data);
new BenchmarkGroupByHash().addPagePreCompute(data);
SingleChannelBenchmarkData singleChannelBenchmarkData = new SingleChannelBenchmarkData();
singleChannelBenchmarkData.setup();
new BenchmarkGroupByHash().bigintGroupByHash(singleChannelBenchmarkData);
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + BenchmarkGroupByHash.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例3: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args) throws IOException, RunnerException {
System.out.println(TEST_CLASSES_REGEX);
Options options = new OptionsBuilder()
.include(TEST_CLASSES_REGEX)
.forks(1)
.measurementIterations(5)
.measurementTime(TimeValue.milliseconds(100))
.threads(1)
.verbosity(VerboseMode.NORMAL)
.build();
new Runner(options).run();
//Alternative way to receive parameters via command line and run the benchmarks
//Main.main(args);
}
示例4: runJMH
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
private static void runJMH(final String parserClasss, final int forks, final int threads, final int warmupit, final int measureit) throws Exception {
final Options opt = new OptionsBuilder()
.include(REGEX)
.forks(forks)
.warmupIterations(warmupit)
.measurementIterations(measureit)
.threads(threads)
.mode(Mode.Throughput)
.timeUnit(TimeUnit.SECONDS)
.verbosity(VerboseMode.EXTRA)
.jvmArgs("-Xmx" + MEMORY, "-Dfile.encoding=utf-8", "-Dbenchmark.impl="+parserClasss)
.resultFormat(ResultFormatType.JSON)
.result(String.format("jmh_benchmark_thrpt_result_%s_f%d_t%d_w%d_i%d_t%s.txt", parserClasss, forks, threads, warmupit, measureit,
TSS))
.output(String.format("jmh_benchmark_thrpt_log_%s_f%d_t%d_w%d_i%d_t%s.txt", parserClasss, forks, threads, warmupit, measureit, TSS))
//.addProfiler(GCProfiler.class) // report GC time
//.addProfiler(StackProfiler.class) // report method stack execution profile
.build();
new Runner(opt).run();
}
示例5: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args) throws RunnerException {
Options opts = new OptionsBuilder()
.include("org.greencheek.spray.cache.memcached.perf.benchmarks.SimpleSmallGetBenchmark.*")
.warmupIterations(20)
.measurementIterations(20)
.timeUnit(TimeUnit.MILLISECONDS)
.threads(2)
.forks(3)
.jvmArgs(JvmArgs.getJvmArgs())
.resultFormat(ResultFormatType.TEXT)
.verbosity(VerboseMode.EXTRA)
.build();
new Runner(opts).run();
}
示例6: getDefaultRunner
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
private Runner getDefaultRunner() {
final OptionsBuilder jmhOptionsBuilder = new OptionsBuilder();
if (!this.isJmhOutput()) {
jmhOptionsBuilder.verbosity(VerboseMode.SILENT);
}
return new Runner(jmhOptionsBuilder.build());
}
示例7: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static final void main(String args[]) throws RunnerException {
Options opt = new OptionsBuilder()
.include(SynchronizedMapBenchmark.class.getSimpleName())
.warmupIterations(5)
.verbosity(VerboseMode.EXTRA) //VERBOSE OUTPUT
.addProfiler(HotspotRuntimeProfiler.class)
.build();
new Runner(opt).run();
}
示例8: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args) throws RunnerException {
Options options = new OptionsBuilder()
.include(".*" + BenchmarkComparison.class.getSimpleName() + ".*")
.verbosity(VerboseMode.NORMAL)
.build();
new Runner(options).run();
}
示例9: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws RunnerException
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + StringFunctionsBenchmark.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例10: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws RunnerException
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + RegexpFunctionsBenchmark.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例11: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws Throwable
{
// assure the benchmarks are valid before running
BenchmarkData data = new BenchmarkData();
data.setup();
new BenchmarkArrayDistinct().arrayDistinct(data);
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + BenchmarkArrayDistinct.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例12: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws Throwable
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + BenchmarkNodeScheduler.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例13: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws RunnerException
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + BenchmarkPageProcessor.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例14: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws RunnerException
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + InCodeGeneratorBenchmark.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}
示例15: main
import org.openjdk.jmh.runner.options.VerboseMode; //导入依赖的package包/类
public static void main(String[] args)
throws RunnerException
{
Options options = new OptionsBuilder()
.verbosity(VerboseMode.NORMAL)
.include(".*" + PageProcessorBenchmark.class.getSimpleName() + ".*")
.build();
new Runner(options).run();
}