Running a single JMH benchmark with Gradle

The Gradle build system makes it very easy to use the JMH library to write benchmarks for your Java code. However, one tricky thing when combining Gradle and JMH is the ability to run a single benchmark when invoking your build. In this article, I&#x27;ll show a simple setup that, with just a few lines of code in your build script, allows you to easily select what benchmark you want to invoke when…