This repo contains the CodSpeed integration for JVM-based projects using JMH:
jmh-fork: Forked JMH with CodSpeed walltime result collectionexamples: Example JMH benchmarks (Gradle and Maven)
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+
- A C toolchain (Linux only, to build the native libraries)
- Build and install the JMH fork to your local Maven repository. Use Gradle: only the Gradle build compiles and bundles the native libraries needed for CodSpeed measurements.
git submodule update --init --recursive
./gradlew -p jmh-fork publishToMavenLocal- Run the example benchmarks:
./gradlew :examples:example-gradle:jmhTo run the benchmarks with CodSpeed locally, you need to install the CodSpeed runner:
codspeed run --mode walltime -- ./gradlew :examples:example-gradle:jmh