本文整理匯總了Java中org.openjdk.jmh.runner.RunnerException類的典型用法代碼示例。如果您正苦於以下問題:Java RunnerException類的具體用法?Java RunnerException怎麽用?Java RunnerException使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
RunnerException類屬於org.openjdk.jmh.runner包,在下文中一共展示了RunnerException類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: runMicroBenchMark
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
@Test
public void runMicroBenchMark() throws RunnerException {
Options opt = new OptionsBuilder()
.include(getClass().getName())
.warmupIterations(2)
.measurementIterations(10)
.mode(Mode.AverageTime)
.timeUnit(TimeUnit.MILLISECONDS)
.addProfiler(GCProfiler.class)
.jvmArgs("-server", "-XX:+UseG1GC", "-Xmx256m")
.shouldDoGC(true)
.forks(1)
.build();
new Runner(opt).run();
}
示例2: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_string_list.DeserJsoniter",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例3: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_10_double_fields.SerThrift",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例4: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
@SuppressWarnings("ObjectAllocationInLoop") public static void main(final String[] args)
throws RunnerException {
final ChainedOptionsBuilder options =
new OptionsBuilder().addProfiler(HotspotThreadProfiler.class)
.addProfiler(HotspotRuntimeProfiler.class).addProfiler(HotspotMemoryProfiler.class)
.addProfiler(GCProfiler.class).addProfiler(StackProfiler.class).shouldFailOnError(true)
.forks(1).resultFormat(ResultFormatType.CSV).detectJvmArgs();
for (int nThreads = 1; nThreads <= 2; nThreads++) {
new Runner(
options.threads(nThreads).output(String.format("%d-thread_bench_results.csv", nThreads))
.build()).run();
}
}
示例5: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_int_list.DeserThrift",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例6: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_10_int_fields.DeserJsoniter",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例7: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_5_string_fields.DeserJsoniter",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例8: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_10_double_fields.DeserDslJson",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例9: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
.include(JMHSample_11_Loops.class.getSimpleName())
.warmupIterations(5)
.measurementIterations(5)
.forks(1)
.build();
new Runner(opt).run();
}
示例10: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_double.DeserJsoniter",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例11: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_double_array.SerFastjson",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例12: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_1_string_field.SerPb",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}
示例13: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
.include(JMHSample_21_ConsumeCPU.class.getSimpleName())
.warmupIterations(1)
.measurementIterations(5)
.forks(1)
.build();
new Runner(opt).run();
}
示例14: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws RunnerException {
Options opt = new OptionsBuilder()
.include(Benchmarks.class.getSimpleName())
// .addProfiler(HotspotMemoryProfiler.class)
.forks(1)
.build();
new Runner(opt).run();
}
示例15: main
import org.openjdk.jmh.runner.RunnerException; //導入依賴的package包/類
public static void main(String[] args) throws IOException, RunnerException {
All.loadJMH();
Main.main(new String[]{
"with_int_list.DeserFastjson",
"-i", "5",
"-wi", "5",
"-f", "1",
});
}