Skip to content

CodSpeedHQ/codspeed-jvm

Repository files navigation

codspeed-jvm

CI Discord CodSpeed Badge

This repo contains the CodSpeed integration for JVM-based projects using JMH:

Usage

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.

Local Usage

Prerequisites

  • JDK 21+
  • Maven (for building the JMH fork)
  • Gradle

Setup

  1. Build and install the instrument hooks to your local Maven repository:
./gradlew :instrument-hooks-jvm:publishToMavenLocal
  1. Build and install the JMH fork:
cd jmh-fork && mvn clean install -DskipTests -q
  1. Run the example benchmarks:
./gradlew :example:jmh

Running with CodSpeed locally

To run the benchmarks with CodSpeed locally, you need to install the CodSpeed runner:

codspeed run --mode walltime -- ./gradlew :example:jmh

About

Libraries to benchmark your code for JVM-based languages

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages