Repository navigation
Split JMH benchmarks into separate CI job - #3214
Conversation
📝 WalkthroughWalkthroughMoves JMH benchmark build-and-run out of conditional steps inside test matrix jobs and into dedicated top-level Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches✨ Simplify code
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 6/8 reviews remaining, refill in 12 minutes and 56 seconds.Comment |
Move JMH performance benchmarks out of the test matrix into a standalone job in all four workflows (linux, macos, windows, pr). This avoids slowing down the test+coverage jobs while still running benchmarks in parallel. Coverage uploads are unaffected since JMH benchmarks don't contribute to coverage.
88a470d to
6cad2fa
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/pr.yaml (1)
88-90: Minor: Distribution differs from Windows CI workflow.This job uses
distribution: 'zulu'for all platforms includingwindows-latest, but the Windows CI workflow (.github/workflows/windows.yaml) usesdistribution: 'temurin'for JDK 25. If the matrix stays multi-platform, consider matching distributions per OS to catch the same JDK-specific behaviors in PRs that would appear in master CI:include: - os: windows-latest distribution: temurin - os: ubuntu-latest distribution: zulu - os: macos-latest distribution: zuluAlternatively, if benchmarks run on
ubuntu-latestonly (per the PR description), this becomes a non-issue.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/pr.yaml around lines 88 - 90, The workflow currently sets distribution: 'zulu' for all matrix entries (see java-version and distribution keys); update the matrix so Windows uses distribution: 'temurin' while Linux/macOS keep 'zulu' (or explicitly reduce the matrix to ubuntu-latest only if benchmarks run solely on Ubuntu) so the PR CI matches the Windows CI behavior in windows.yaml; adjust the matrix include entries accordingly for the java-version/distribution pairs.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/pr.yaml:
- Around line 88-90: The workflow currently sets distribution: 'zulu' for all
matrix entries (see java-version and distribution keys); update the matrix so
Windows uses distribution: 'temurin' while Linux/macOS keep 'zulu' (or
explicitly reduce the matrix to ubuntu-latest only if benchmarks run solely on
Ubuntu) so the PR CI matches the Windows CI behavior in windows.yaml; adjust the
matrix include entries accordingly for the java-version/distribution pairs.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 1ac2eb29-dcc0-4a13-b359-ec4ff2bcb4d1
📒 Files selected for processing (4)
.github/workflows/linux.yaml.github/workflows/macos.yaml.github/workflows/pr.yaml.github/workflows/windows.yaml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/linux.yaml
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Codacy Static Code Analysis
🔇 Additional comments (3)
.github/workflows/macos.yaml (1)
55-70: LGTM! Clean extraction of the benchmarks job.The new
benchmarksjob is consistent with the linux.yaml approach — same JDK setup, Maven build command, and JMH parameters. Usingmacos-15as the runner aligns with the coverage upload target in the testmatrix job above, which makes sense for keeping benchmark results comparable..github/workflows/pr.yaml (1)
76-81: Clarify: PR description saysubuntu-latestonly, but code uses a 3-OS matrix.The PR description states "Benchmark jobs run on one runner per platform: ... PR: ubuntu-latest", but this job runs benchmarks on all three OSes via the matrix. If the intent is to keep PR benchmark runs lightweight (single runner), consider:
benchmarks: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest, windows-latest] - fail-fast: false - name: JMH Benchmarks, ${{ matrix.os }} + runs-on: ubuntu-latest + name: JMH BenchmarksIf running on all three is intentional for better PR coverage, updating the PR description would help avoid confusion.
.github/workflows/windows.yaml (1)
51-66: LGTM! Well-structured Windows benchmark job.Good attention to detail with:
- Quoted Maven flags (
"-DskipTests") for PowerShell compatibility- Using
temurindistribution to match the existing testmatrix configuration- Running on
windows-2022consistent with the coverage upload target
Move JMH performance benchmarks out of the test matrix into a standalone parallel job in all four workflows (linux, macos, windows, pr).
Before: JDK 25 test jobs ran unit tests + comparison tests + JMH benchmarks sequentially, making them the slowest jobs in the matrix.
After: JDK 25 test jobs run unit tests + comparison tests only (with coverage upload). JMH benchmarks run in a separate parallel job with no coverage overhead.
Coverage uploads are unaffected — JMH benchmarks never contributed to coverage (they're in
src/main, notsrc/test).Benchmark jobs run on one runner per platform:
ubuntu-latestmacos-15windows-2022ubuntu-latestSummary by CodeRabbit