Skip to content

ci(benchmarks): treat a blank baseline_branch.txt as no baseline in check-big-regressions - #4559

Merged
bm1549 merged 1 commit into
masterfrom
brian.marks/fix-check-big-regressions-empty-baseline
Nov 26, 2026
Merged

bm1549 merged 1 commit into
masterfrom
brian.marks/fix-check-big-regressions-empty-baseline

Conversation

@bm1549

@bm1549 bm1549 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Description

check-big-regressions fails on every full benchmark run of a branch that has no PR yet.

#4545 made the gate require baseline .converted.json files whenever reports/baseline_branch.txt is non-empty ([ -s ... ]). Without a PR, bp-runner finds no baseline branch but still writes the file, as a single \n. -s is true for that file, so the gate asks for reports/baseline-*.converted.json files that were never produced and exits 1:

ERROR: reports/baseline-tracer-bench-results.converted.json is missing - a benchmarks-tracer shard had issues

This change sets the baseline side only when the file contains a non-whitespace character (grep -q '[^[:space:]]'). bp-runner's fail-on-regression.sh already reads the file as BASELINE_BRANCH=$(cat ...), which strips the newline, so with no PR it prints "BASELINE_BRANCH was not found" and exits 0. The gate now agrees with it.

Testing: I extracted the job's script: from the YAML and ran it under bash, with bp-runner stubbed:

baseline_branch.txt all 6 present candidate only one candidate missing one baseline missing
missing 0 0 1 0
empty 0 0 1 0
\n 0 0 (was 1) 1 0
master\n 0 1 1 1

I also ran fail-on-regression.sh against a newline-only file: it warns and exits 0.

#4560 (benchmark reporting job speedup) also edits .gitlab/benchmarks.yml. The two PRs don't depend on each other and both branch from master. In this job, that PR only changes check-big-regressions' image: line, 10 lines above this one. I cherry-picked the two onto master in both orders and both applied without conflicts, so whichever merges second should rebase cleanly.

Reviewer checklist

  • Test coverage seems ok.
  • Appropriate labels assigned.

…heck-big-regressions

Without a PR, bp-runner writes baseline_branch.txt as a single newline, so
the [ -s ] test from #4545 required baseline results that never ran and the
gate failed on every full benchmark run of a branch with no PR yet. Check for
a non-whitespace character instead, matching how fail-on-regression.sh reads
the file ($(cat) strips the newline, so it warns and exits 0).
@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
@bm1549
bm1549 marked this pull request as ready for review November 25, 2026 17:16
@bm1549
bm1549 requested review from a team as code owners November 25, 2026 17:16
@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:17:41.470758Z 17a47e2 Draft marked ready
🔒 Security Review ✅ Completed 2026-11-25T17:19:10.607778Z 17a47e2 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-us1-prod

datadog-datadog-us1-prod 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.91% (-0.01%)

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

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

Newline-only baseline files no longer require nonexistent baseline reports; nonblank branch names still require baseline artifacts. The static reviewer found no actionable regressions.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 17a47e2

@pr-commenter

pr-commenter Bot commented Nov 25, 2026

Copy link
Copy Markdown

Benchmarks [ tracer ]

Benchmark execution time: 2026-11-25 17:51:50

Comparing candidate commit 17a47e2 in PR branch brian.marks/fix-check-big-regressions-empty-baseline with baseline commit 58de001 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 217 metrics, 1 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 ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:ComposerTelemetryBench/benchTelemetryParsing

  • unstable execution_time [+0.303µs; +1.897µs] or [+1.903%; +11.934%]

@bm1549
bm1549 merged commit 16590aa into master Nov 26, 2026
2091 checks passed
@bm1549
bm1549 deleted the brian.marks/fix-check-big-regressions-empty-baseline branch November 26, 2026 13:59
@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