Skip to content

ci: split phpbench and phpbench-opcache into two shards each - #4562

Merged
bm1549 merged 2 commits into
masterfrom
brian.marks/ci-phpbench-shards
Nov 26, 2026
Merged

bm1549 merged 2 commits into
masterfrom
brian.marks/ci-phpbench-shards

Conversation

@bm1549

@bm1549 bm1549 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

Each benchmarks-tracer phpbench job ran all 54 subjects twice, candidate then baseline, and took 37–39 minutes. That set the end of the benchmarks stage and of check-big-regressions.

This PR splits phpbench and phpbench-opcache into two shards each with a new matrix variable, PHPBENCH_SHARD:

  • shard 1: WordPressBench and LaravelBench
  • shard 2: every other subject, so new subjects land here by default

runall.sh picks the shard through the Makefile's FILTER. Shard result files get a -1/-2 suffix, written by runall.sh and the rename in .gitlab/benchmarks/steps/run-revision.sh, and check-big-regressions now requires all five tracer result files. A baseline whose runall.sh predates PHPBENCH_SHARD runs the candidate's copy, the same fallback as for TRACER_PART.

Measured with a forced baseline on both an experiment pipeline and a control pipeline from the same base:

control this change
phpbench 38.8 min 23.9 / 27.1 min
phpbench-opcache 37.1 min 25.7 / 26.7 min
Benchmarks end 40.7 min 28.8 min
check-big-regressions end 44.4 min 31.7 min
Pipeline first-attempt end 46.0 min 41.4 min

Both compared the same 110 scenarios and 218 metrics and produced one combined PR comment body.

The table was measured before the rebase onto #4537, which moved the result-file rename into run-revision.sh and made every job build and BOLT-align both revisions before timing either. The benchmarks jobs on this pipeline re-check the timings under that flow.

Cost: about 104 bare-metal runner-minutes per PR instead of 76, and 5 concurrent metal jobs instead of 3.

Risk: the result file names change (tracer-bench-results-1, tracer-bench-results-opcache-2, ...). As far as I can tell from the upload scripts, the API keys series on the benchmark names inside each .converted.json, not on the file name, so series should carry on. Dashboards or queries that filter on the file name could still split, so this needs a check with the benchmarking platform team before merging.

Follow-up: shard 2 runs about 3 minutes longer than shard 1 for phpbench. Moving the Symfony subjects to shard 1 could even them out; not measured here.

Rebased onto current master, which already includes #4559. #4560 also edits .gitlab/benchmarks.yml; this PR doesn't depend on it and rebases again if #4560 merges first.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

@bm1549 bm1549 added the AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos label Nov 25, 2026
@datadog-datadog-prod-us1-2

datadog-datadog-prod-us1-2 Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
• Patch Coverage: 100.00%
• Overall Coverage: 80.95% (+0.04%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 5bace87 | Docs | View more details | Give us feedback!

@bm1549
bm1549 marked this pull request as ready for review November 25, 2026 17:53
@bm1549
bm1549 requested review from a team as code owners November 25, 2026 17:53
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-25T17:55:06.017795Z c0e3052 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-25T17:57:25.628847Z c0e3052 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot 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.

Bits Code Review: PASS

More details

The shard filters partition all 54 benchmark subjects without gaps or overlap. Shard-specific result names are consistent through artifact collection and regression checks, including the fallback for older baselines.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit c0e3052

@pr-commenter

pr-commenter Bot commented Nov 25, 2026 •

Copy link
Copy Markdown

Benchmarks [ tracer ]

Benchmark execution time: 2026-11-26 16:49:02

Comparing candidate commit 5bace87 in PR branch brian.marks/ci-phpbench-shards with baseline commit 308338c in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 218 metrics, 0 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

@Leiyks Leiyks left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

The shard split looks right. This needs a rebase though: #4537 moved this script into .gitlab/benchmarks/steps/run-revision.sh, so the PHPBENCH_SHARD fallback and the -1/-2 renames have to go there now. #4537 also builds and BOLT-aligns both revisions before timing in every job, so the timings are worth a quick re-check after the rebase.

Each phpbench part ran its 54 subjects twice (candidate and baseline) for
about 25 of its 37-39 minutes. Split both parts with PHPBENCH_SHARD:
shard 1 runs WordPressBench and LaravelBench (about 6 minutes per run),
shard 2 every other subject (about 6.6 minutes), selected through the
Makefile's FILTER. Shard results get a -1/-2 suffix so the merged
reports/ keeps one file per shard; check-big-regressions requires all
five tracer result files. A baseline runall.sh without PHPBENCH_SHARD
runs the candidate's copy, as for TRACER_PART.
Match the single-line comment norm of run-revision.sh: compress the
baseline-fallback comment to one line and drop the one narrating the
suffix assignment. Also hoist the OPcache result stem into a variable so
the shard suffix is interpolated once instead of three times.
@bm1549
bm1549 force-pushed the brian.marks/ci-phpbench-shards branch from c0e3052 to 5bace87 Compare November 26, 2026 16:14

@datadog-datadog-prod-us1-2 datadog-datadog-prod-us1-2 Bot 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.

Bits Code Review: PASS

More details

The shard filters cover all 54 benchmark methods without omissions or overlaps. Result-file naming and legacy-baseline fallback are consistent with the five-job matrix.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 5bace87

@bm1549
bm1549 merged commit 80452b0 into master Nov 26, 2026
2091 checks passed
@bm1549
bm1549 deleted the brian.marks/ci-phpbench-shards branch November 26, 2026 17:00
@github-actions github-actions Bot added this to the 2.1.0 milestone Nov 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AI Generated Largely based on code generated by an AI or LLM. This label is the same across all dd-trace-* repos

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants