Skip to content

feat: exclude warmup rounds from perf flamegraph#8

Open
not-matthias wants to merge 3 commits intomainfrom
cod-2528-exclude-warmup-rounds-from-perf-flamegraph-in-java
Open

feat: exclude warmup rounds from perf flamegraph#8
not-matthias wants to merge 3 commits intomainfrom
cod-2528-exclude-warmup-rounds-from-perf-flamegraph-in-java

Conversation

@not-matthias
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR aims to prevent warmup-only forks from polluting CodSpeed/perf flamegraphs by marking warmup forks at JVM startup and suppressing benchmark marker emission in those forks.

Changes:

  • Add a warmup-fork flag to forked JVM command construction and propagate it via a system property.
  • Suppress CodSpeed benchmark marker emission in forked JVMs identified as warmup-only forks.
  • Update tests for the changed getForkedMainCommand signature and exclude native-* directories from the license plugin.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
jmh-fork/jmh-core/src/test/java/org/openjdk/jmh/runner/RunnerTest.java Updates test calls to the new getForkedMainCommand(..., warmupFork) signature.
jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java Passes warmupFork to fork command builder and adds -Dio.codspeed.warmupFork=true for warmup forks.
jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/BaseRunner.java Introduces warmup-fork detection and attempts to add benchmark start/end markers for measurement iterations (suppressed for warmup forks).
jmh-fork/jmh-core/pom.xml Excludes native-*/** from the license formatting/check plugin.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread jmh-fork/jmh-core/src/main/java/org/openjdk/jmh/runner/Runner.java
@not-matthias not-matthias force-pushed the cod-2528-exclude-warmup-rounds-from-perf-flamegraph-in-java branch from 0411853 to ff83f3b Compare April 17, 2026 14:45
@codspeed-hq
Copy link
Copy Markdown

codspeed-hq bot commented Apr 17, 2026

Merging this PR will degrade performance by 20.31%

❌ 2 regressed benchmarks
✅ 123 untouched benchmarks
⏩ 9 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
fibonacciBottomUp[20] 1.2 µs 1.4 µs -12.92%
dualPivotQuickSort[10000] 4.9 ms 6.1 ms -20.31%

Comparing cod-2528-exclude-warmup-rounds-from-perf-flamegraph-in-java (ff83f3b) with main (c7c19aa)

Open in CodSpeed

Footnotes

  1. 9 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

Copy link
Copy Markdown

@GuillaumeLagrange GuillaumeLagrange left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants