import org.openjdk.jmh.annotations.*; @BenchmarkMode(Mode.AverageTime) @OutputTimeUnit(TimeUnit.NANOSECONDS) public class MyBenchmark { @Benchmark public void testMethod() { } public static void main(String[] args) throws RunnerException { Options options = new OptionsBuilder() .include(MyBenchmark.class.getSimpleName()) .forks(1) .build(); new Runner(options).run(); } }


上一篇:
下一篇:
切换中文