Skip to content

Migrate microbenchmarks from benchmarking-platform into this repository - #408

Merged
igoragoli merged 17 commits into
mainfrom
augusto/cpp-microbenchmarks-bp-runner
Nov 27, 2026
Merged

igoragoli merged 17 commits into
mainfrom
augusto/cpp-microbenchmarks-bp-runner

Conversation

@igoragoli

@igoragoli igoragoli commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Why

The microbenchmarks are split across two repositories: the Docker image and the step scripts live on the dd-trace-cpp branch of benchmarking-platform, cloned at CI time by every benchmark job, while the benchmark code lives here.

This creates friction and complicates maintenance for LP teams, product teams, and the perf team.

Here's the dd-trace-cpp branch on the benchmarking-platform repo.

APMSP-4182 All microbenchmarks are migrated directly to dd-trace-* repositories

What

Simplify the microbenchmarking setup by moving all code to this repo, along with documentation on how to best use and maintain the setup.

Also, use bp-runner templates. The dd-trace-cpp branch on benchmarking-platform had many Bash scripts to achieve secondary tasks (e.g., analyze results, upload results to S3).

bp-runner already has centralized templates for those, and it's easier for the perf team to maintain those scripts there.

Testing

@pr-commenter

pr-commenter Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-27 14:53:51

Comparing candidate commit 5119c0a in PR branch augusto/cpp-microbenchmarks-bp-runner with baseline commit e07276e in branch main.

📊 Benchmarking dashboard

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

@igoragoli
igoragoli changed the base branch from augusto/cpp-microbenchmarks-in-repo to main November 16, 2026 15:59
@igoragoli igoragoli changed the title Run microbenchmarks through bp-runner configs Migrate microbenchmarks from benchmarking-platform into this repository Nov 16, 2026
Move the suite in-repo: container and gate config from the BP
dd-trace-cpp branch (verbatim apart from path rewrites), the CI image
built in-repo via the shared build-ci-images template, and the flow
run on bp-runner configs (bp-runner.yml, bp-runner.pr-comment.yml)
instead of step scripts. Baseline via bp-runner auto-resolution.
@igoragoli
igoragoli force-pushed the augusto/cpp-microbenchmarks-bp-runner branch from 1d4a9c5 to e5d93fc Compare November 17, 2026 10:30
@igoragoli
igoragoli marked this pull request as ready for review November 17, 2026 14:24
@igoragoli
igoragoli requested review from a team as code owners November 17, 2026 14:24
@igoragoli
igoragoli requested review from cataphract and removed request for a team November 17, 2026 14:24
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 17, 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-17T14:25:50.926104Z 15893af Draft marked ready
🔒 Security Review ✅ Completed 2026-11-17T14:32:01.147124Z 15893af 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-prod-us1-6 datadog-prod-us1-6 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: FAIL

An S3 upload failure now propagates as a hard failure in the required benchmarks job, blocking downstream regression-check and PR-reporting jobs; the previous upload-results-to-s3.sh || : tolerated this, and the pinned bp-runner offers no per-step nonfatal setting, so the upload must be isolated (e.g., in a separate allow-failure job) to restore the original behaviour.

Open Bits AI session

🤖 Bits Code Review · Commit 15893af

Comment thread .gitlab/benchmarks/bp-runner.yml Resolved

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

The PR consolidates benchmark container builds, runner configuration, regression gating, and documentation in this repository. The latest commit adds two S3 retries, mitigating transient errors, but the earlier issue remains: exhausting retries still fails successful benchmark runs and skips regression checks and PR reporting.

Open Bits AI session

🤖 Bits Code Review · Commit 3eb3a68

Comment thread .gitlab/benchmarks/bp-runner.yml Resolved

@datadog-prod-us1-6 datadog-prod-us1-6 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 was unable to complete this review. View session

Please try again by commenting @datadog review.

@xlamorlette-datadog xlamorlette-datadog left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please follow Contributing documentation, notably:

  • The PR description must be written manually.
  • The PR description must not restate implementation details and must not contain irrelevant details.

@igoragoli

Copy link
Copy Markdown
Contributor Author

Thanks, @xlamorlette-datadog! I removed the "(AI-generated)" sections of the PR.

They had some implementation details I imagined would facilitate reviews, but I suppose the PR is quite understandable as is :)

Comment thread .gitlab/benchmarks/container/Dockerfile Resolved
Comment thread .gitlab/benchmarks/bp-runner.yml Resolved
Comment thread .gitlab/benchmarks/bp-runner.yml Resolved
Drop the ppa:git-core repository and the apt upgrade, and drop the
packages nothing uses (clang, clang-format, gdb, libc++-dev,
libc++abi-dev, shellcheck, ssh). Keep wget and sed because
bin/install-cmake needs them, and fetch install-cmake with a depth-1
clone of the repository. Delete the manual Google Benchmark install:
the benchmark suite builds it from the benchmark/google-benchmark
submodule.
The benchmark binary needs the google-benchmark and tinycc submodules,
not just google-benchmark. Drop --recurse-submodules from the git clone;
the later git submodule update --init --recursive already initialises
them after the SHA checkout. Quote $BRANCH and $COMMIT_SHA.
The four analyzer settings variables, the rules block, and the
reports artifacts block were duplicated across the benchmark jobs.
Anchor them at the top of the file and reference them from each job.
Values are unchanged.
Sort the directory listing bullets alphabetically and capitalize the
section titles. Replace the em-dashes in the file list with colons.

@datadog-prod-us1-6 datadog-prod-us1-6 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 PR consolidates microbenchmark images, execution, regression gating, and documentation in this repository, with slimmer dependencies and shared CI settings. No reportable findings remain: the earlier S3 concern is withdrawn following the author’s explicit confirmation that failure after exhausted retries is intentional, rather than being fixed by this commit.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit f278f41

@igoragoli

Copy link
Copy Markdown
Contributor Author

Thank you for the thorough review @xlamorlette-datadog!

I applied fixes, rebuilt the benchmark image and ran a new benchmark based on the new image. Running successfully: https://gitlab.ddbuild.io/DataDog/apm-reliability/dd-trace-cpp/-/jobs/2303798604

Comment thread .gitlab/benchmarks.yml Resolved
Comment thread .gitlab/benchmarks.yml Resolved
Comment thread .gitlab/benchmarks.yml Resolved
Comment thread .gitlab/benchmarks.yml Resolved
Comment thread .gitlab/benchmarks/README.md Resolved
Comment thread .gitlab/benchmarks/README.md Resolved
Comment thread .gitlab/benchmarks/README.md Resolved
Comment thread .gitlab/benchmarks/bp-runner.yml Resolved
Merge a split comment, drop a comment that repeats the code, and describe allow_failure without referring to removed code.
The three bp-runner jobs repeated the same ARTIFACTS_DIR and git insteadOf setup. Move it to a .bp-runner-prelude before_script. Drop the CI_JOB_TOKEN check, which is always true in a GitLab job.
bin/install-cmake is already executable and does not depend on the working directory, so call it by path.
The execution flow already explains what each job does, so the file list only names each config. The repin step no longer asks for the job URL, which benchmarks.yml does not keep.
"Experiment" is a bp-runner term the README never defines. Say the benchmarks job and the bp-runner.yml flow instead.
@igoragoli
igoragoli merged commit 0dec484 into main Nov 27, 2026
40 checks passed
@igoragoli
igoragoli deleted the augusto/cpp-microbenchmarks-bp-runner branch November 27, 2026 15:03
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