Closed loxal closed 7 years ago
Hey @loxal, sorry the plugin is only for reporting not for execution... I've edited the readme to make it more clear! You can have a look into https://blog.morethan.io/jmh-with-gradle-from-easy-to-simple-dc872d57cf7f , i've listed multiple options on how you can add benchmark execution to your gradle build. There are a few plugins for that, but you can also simply setup a JavaExec task for that (use or copy from that gist).
HTH and thanks for your feedback!
Thanks, for most plugin consumers just want a visual report. They usually don't have all the prerequisites in place or even the general knowledge on how JMH works in detail. It took me some time to figure out how I get a raw JSON report from one plugin to feed it to your plugin and get the final result.
# add magic configuration to build.gradle
./gradlew clean jmh
./gradlew jmhReport
...was the thing I've done to get what I wanted.
Hey @loxal glad you figured it out, and let me know if i should add anything more to the readme!
What you also can do is to add this to your build:
tasks.jmh.finalizedBy tasks.jmhReport
Then you don't need to execute jmhReport separately, you just do
./gradlew clean jmh
And it builds the report immediately after the benchmark execution!
Which Gradle task do I need to run to get a report? I'll try out but I would have expected to find it in the README :)