If you want to benchmark your code, the Java Microbenchmark Harness is the tool of choice.In our example, we will use the refill-rate-limiter project. Since refill-rate-limiter uses Gradle, we will use the following plugin for Gradle: