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:

  • jmh-fork: Forked JMH with CodSpeed walltime result collection
  • examples: Example JMH benchmarks (Gradle and Maven)

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 JMH fork to your local Maven repository:
cd jmh-fork && mvn clean install -DskipTests -q
  1. Run the example benchmarks:
./gradlew :examples:example-gradle:jmh

Running with CodSpeed locally

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

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

About

Libraries to benchmark your code for JVM-based languages

Topics

Resources

Contributing

Stars

Watchers

Forks

Packages

 
 
 

Contributors