This repo contains the CodSpeed integration for JVM-based projects using JMH:
jmh-fork: Forked JMH with CodSpeed walltime result collectioninstrument-hooks-jvm: JNI bindings for CodSpeed instrument hooksexample: Example JMH benchmarks
Add the CodSpeed JMH fork to your project and write benchmarks as you normally would with JMH. When running your benchmarks in CI with CodSpeed, the results will be automatically collected and reported.
For information on how to integrate it, see the CodSpeed documentation. If you need further information to integrate CodSpeed to your project, please feel free to open an issue or ask for help on our discord server.
- JDK 21+
- Maven (for building the JMH fork)
- Gradle
- Build and install the instrument hooks to your local Maven repository:
./gradlew :instrument-hooks-jvm:publishToMavenLocal- Build and install the JMH fork:
cd jmh-fork && mvn clean install -DskipTests -q- Run the example benchmarks:
./gradlew :example:jmhTo run the benchmarks with CodSpeed locally, you need to install the CodSpeed runner:
codspeed run --mode walltime -- ./gradlew :example:jmh