How to use JMH with gradle?

后端 未结 5 1807
清歌不尽
清歌不尽 2021-02-04 02:33

I want to use JMH, an OpenJDK microbenchmark tool, with gradle. However, Im getting the NPE on compilation. On the other hand, JMH works when using from maven.<

5条回答
  •  误落风尘
    2021-02-04 03:12

    If you're an IntelliJ user, perhaps the easiest way to make it work, without all that workarounds, is to use the IDE plugin:

    https://github.com/artyushov/idea-jmh-plugin

    • Add the dependencies
    • Create your benchmark
    • be happy :)

提交回复
热议问题