Repository navigation
Conversation
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved runner security and benchmark correctness issues must be addressed before approval.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Stabilizes score-director benchmarks through batched execution, adjusted JMH settings, pinned benchmark builds, and self-hosted CI execution.
Changes:
- Batch 100 benchmark cycles per JMH invocation.
- Adjust benchmark checkout and build references.
- Run score-director benchmarks on self-hosted infrastructure.
File summaries
| File | Summary |
|---|---|
src/main/java/ai/timefold/solver/benchmarks/micro/scoredirector/Main.java |
Updates JMH configuration; tiered compilation control needs to be retained. |
src/main/java/ai/timefold/solver/benchmarks/micro/scoredirector/jmh/AbstractBenchmark.java |
Adds batched invocation execution; documentation should accurately describe the lifecycle. |
.github/workflows/performance_score_director.yml |
Uses self-hosted execution and adjusts benchmark refs; runner isolation and consistent refs require changes. |
.github/workflows/performance_move_provider.yml |
Avoids unintended benchmark branch switching. |
Review details
Suppressed comments (2)
.github/workflows/performance_score_director.yml:98
- This pin is later conditionally overwritten by the "Switch to correct Benchmarks branch" step: when the selected baseline ref exists in the benchmark repository (for example, a release tag),
build_baselinecompiles that ref, while the SUT can retain${{ github.sha }}formain. The two jars can therefore contain differentMain/AbstractBenchmarkimplementations, so the comparison still conflates harness changes with solver changes. Remove the later benchmark checkout or make one explicit benchmark ref apply to both builds.
# Same commit for both baseline and SUT builds, so a harness-only change never confounds
# the solver comparison. Pinning this to a fixed branch name meant a harness fix on any
# other branch (incl. this one) was silently never exercised by this workflow; use the
# commit that dispatched this run instead, whichever branch that happens to be.
ref: ${{ github.sha }}
src/main/java/ai/timefold/solver/benchmarks/micro/scoredirector/jmh/AbstractBenchmark.java:23
- These are not independent draw-execute-score cycles:
AbstractProblem.runInvocation()skipscalculateScore()for temporary moves and deliberately keeps every tenth move, so the score-director state carries across iterations. Please describe this as batching the per-invocation lifecycle instead, otherwise the new documentation misstates what the benchmark measures.
* Batches this many independent draw-execute-score cycles into one JMH invocation,
- Files reviewed: 4/4 changed files
- Comments generated: 2
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| cancel-in-progress: true | ||
| needs: [ decisions, build_baseline, build_sut ] | ||
| runs-on: ubuntu-24.04-arm # Github-hosted Arm runner; free and GA for this public repo. | ||
| runs-on: self-hosted # We need a stable machine to actually run the benchmarks. |
| // steady-state throughput, so skipping tiering removes that remaining lottery: | ||
| // every fork goes straight to C2. | ||
| .jvmArgsAppend("-XX:-TieredCompilation"); | ||
| var options = getBaseJmhConfig(configuration); |
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
As a result of many experiments, I decided to keep the self-hosted runner, as I couldn't get this to stabilize on Github infrastructure. I got it down to +/- 6 % in the end, but that's still too much.