Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 0 additions & 7 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,6 @@ The repository combines Maven and Gradle via Gradle's composite build feature:
4. Update version reference in root `build.gradle.kts` if needed
5. Test both Gradle and Maven examples to verify compatibility

## Profiling & Debugging

Use `just` commands for quick profiling workflows (see `Justfile`):
- `just profile-codspeed` — walltime profiling via CodSpeed runner
- `just profile-perf` — Linux perf + flamegraph (requires Linux + JDK perf integration)
- `just profile-asprof` — async-profiler flamegraph

## Notes

- **Submodules**: Repository uses Git submodules (`.gitmodules`). Clone with `--recurse-submodules`.
Expand Down
22 changes: 8 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,23 +1,22 @@
<div align="center">
<h1>codspeed-jvm</h1>

[![CI](https://github.com/AvalancheHQ/codspeed-jvm/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/AvalancheHQ/codspeed-jvm/actions/workflows/ci.yml)
[![CI](https://github.com/CodSpeedHQ/codspeed-jvm/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/CodSpeedHQ/codspeed-jvm/actions/workflows/ci.yml)
[![Discord](https://img.shields.io/badge/chat%20on-discord-7289da.svg)](https://discord.com/invite/MxpaCfKSqF)
[![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/AvalancheHQ/codspeed-jvm)
[![CodSpeed Badge](https://img.shields.io/endpoint?url=https://codspeed.io/badge.json)](https://codspeed.io/CodSpeedHQ/codspeed-jvm)

</div>

This repo contains the CodSpeed integration for JVM-based projects using [JMH](https://github.com/openjdk/jmh):

- [`jmh-fork`](./jmh-fork/): Forked JMH with CodSpeed walltime result collection
- [`instrument-hooks-jvm`](./instrument-hooks-jvm/): JNI bindings for CodSpeed [instrument hooks](https://github.com/CodSpeedHQ/instrument-hooks)
- [`example`](./example/): Example JMH benchmarks
- [`examples`](./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](https://codspeed.io/docs). 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.
For information on how to integrate it, see the [CodSpeed documentation](https://codspeed.io/docs). 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](https://discord.com/invite/MxpaCfKSqF).

## Local Usage

Expand All @@ -29,25 +28,20 @@ For information on how to integrate it, see the [CodSpeed documentation](https:/

### Setup

1. Build and install the instrument hooks to your local Maven repository:
```bash
./gradlew :instrument-hooks-jvm:publishToMavenLocal
```

2. Build and install the JMH fork:
1. Build and install the JMH fork to your local Maven repository:
```bash
cd jmh-fork && mvn clean install -DskipTests -q
```

3. Run the example benchmarks:
2. Run the example benchmarks:
```bash
./gradlew :example:jmh
./gradlew :examples:example-gradle:jmh
```

### Running with CodSpeed locally

To run the benchmarks with CodSpeed locally, you need to install the [CodSpeed runner](https://codspeed.io/docs):

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