From 1847932fc35bbda70238180854be9a9b9237d296 Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Thu, 9 Apr 2026 11:08:53 +0000 Subject: [PATCH 1/2] docs: document how to run JMH benchmarks in CONTRIBUTING.md Signed-off-by: Gregor Zeitlinger --- CONTRIBUTING.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9cb55cf8a37..7bf2c460f26 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -205,6 +205,25 @@ All changes to the SDK configuration options or autoconfigure module should be d * Unit tests target Java 8, so language features such as lambda and streams can be used in tests. +### Benchmarks + +Performance-sensitive modules include [JMH](https://openjdk.org/projects/code-tools/jmh/) benchmarks +under `src/jmh/java`. To run all benchmarks in a module: + +```bash +./gradlew :sdk:trace:jmh +``` + +To run a single benchmark class: + +```bash +./gradlew -PjmhIncludeSingleClass=BatchSpanProcessorBenchmark :sdk:trace:jmh +``` + +Results are written as JSON to `build/results/jmh/results.json` and an HTML report is generated +alongside it. When submitting a PR that claims a performance improvement, please include JMH output +(number of threads, iterations, scores with error margins) so reviewers can evaluate the change. + ## Specific tasks ### Updating the Snapshot build number From 97772a67ec9cd19f31dd84122b035e1f08aa739b Mon Sep 17 00:00:00 2001 From: Gregor Zeitlinger Date: Wed, 22 Apr 2026 15:40:34 +0000 Subject: [PATCH 2/2] docs: update JMH benchmark guidance Signed-off-by: Gregor Zeitlinger --- CONTRIBUTING.md | 19 +++---------------- 1 file changed, 3 insertions(+), 16 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 7bf2c460f26..29e9c74f84b 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -207,22 +207,9 @@ All changes to the SDK configuration options or autoconfigure module should be d ### Benchmarks -Performance-sensitive modules include [JMH](https://openjdk.org/projects/code-tools/jmh/) benchmarks -under `src/jmh/java`. To run all benchmarks in a module: - -```bash -./gradlew :sdk:trace:jmh -``` - -To run a single benchmark class: - -```bash -./gradlew -PjmhIncludeSingleClass=BatchSpanProcessorBenchmark :sdk:trace:jmh -``` - -Results are written as JSON to `build/results/jmh/results.json` and an HTML report is generated -alongside it. When submitting a PR that claims a performance improvement, please include JMH output -(number of threads, iterations, scores with error margins) so reviewers can evaluate the change. +Benchmark instructions now live in [docs/knowledge/other-tasks.md#benchmarks-jmh](docs/knowledge/other-tasks.md#benchmarks-jmh). +If you are submitting a performance-sensitive PR, include JMH output (number of threads, +iterations, scores with error margins) so reviewers can evaluate the change. ## Specific tasks