Skip to content

ci: scoredirector benchmark stabilization - #160

Merged
triceo merged 9 commits into
mainfrom
stable
Sep 15, 2026
Merged

triceo merged 9 commits into
mainfrom
stable

Conversation

@triceo

@triceo triceo commented Sep 15, 2026

Copy link
Copy Markdown
Collaborator

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.

Copilot AI lite review requested due to automatic review settings September 15, 2026 11:07
@triceo
triceo merged commit 1ece513 into main Sep 15, 2026
6 of 7 checks passed
@triceo
triceo deleted the stable branch September 15, 2026 11:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟡 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_baseline compiles that ref, while the SUT can retain ${{ github.sha }} for main. The two jars can therefore contain different Main/AbstractBenchmark implementations, 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() skips calculateScore() 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

1 active deployment
internal — e754fcbf Deployed Sep 15, 2026 by triceo via approval_required #327
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.

2 participants