Skip to content

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

Closed
igoragoli wants to merge 6 commits into
mainfrom
augusto/cpp-microbenchmarks-in-repo
Closed

igoragoli wants to merge 6 commits into
mainfrom
augusto/cpp-microbenchmarks-in-repo

Conversation

@igoragoli

@igoragoli igoragoli commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Why

Currently, microbenchmarks are split cross multiple repositories, with Docker images living in benchmarking-platform; and benchmarking code/scripts in both benchmarking-platform and dd-trace-*.

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-4812 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.

(AI-generated):

  • Copy container/ (Dockerfile, install-cpp-deps.sh), the 7 steps/ scripts, and bp-runner.fail-on-regression.yml verbatim from the dd-trace-cpp branch of benchmarking-platform into .gitlab/benchmarks/. Only the internal /platform/steps/ references were adjusted to the new location.
  • .gitlab/benchmarks.yml: the benchmarks job now calls the local steps (via PATH) instead of cloning the platform; check-big-regressions runs bp-runner against .gitlab/benchmarks/bp-runner.fail-on-regression.yml. No behavior changes.
  • Build the CI image in-repo: include build-ci-images.template.yml from DataDog/benchmarking-platform-tools, set BASE_CI_IMAGE_SUFFIX/BASE_CI_IMAGE_CONTAINER_DIR, and run the manual build-benchmark-ci-images job in the benchmarks stage.
  • Refresh the benchmarks README (.gitlab/benchmarks/README.md, replaces .gitlab/BENCHMARKS.md): how to add/update a benchmark, mark one flaky, run locally, and rebuild the image.

Testing

(AI-generated):

  • The benchmarks job pulled the in-repo image: log line Using Kubernetes executor with image registry.ddbuild.io/ci/benchmarking-platform:dd-trace-cpp-152931925.
  • Logs grep clean: every error/warning hit is tooling noise (cmake feature probes, UNCONFIDENCE_THRESHOLD is deprecated, boto3 Python 3.9 deprecation, benchmark_analyzer alias deprecation).
  • Uploads succeeded: S3 plus SUCCESS! Uploaded baseline/candidate.converted.json to Benchmarking Platform service!.
  • All 8 trend series on the BP API contain a point from pipeline 152936654; scenario names unchanged (BM_Hex_uint64 23.6 µs, previous point 24.6 µs).
  • Artifacts parse with sane values: candidate.json (GoogleBenchmark, 112 entries) and baseline.converted.json (schema v1, 8 scenarios).
  • grep -rnE 'git clone.*benchmarking-platform(\.git)?( |$)' .gitlab/ returns nothing — no job clones the platform anymore.
  • All changed CI files parse as valid YAML (python3 -c "import yaml; yaml.safe_load(...)").
  • bash -n passes on every copied/edited script, and every script the jobs call exists in the repo.
  • Copied files verified byte-identical to origin/dd-trace-cpp on benchmarking-platform (before the path-only edits).

Copy container/, steps/, and the regression gate config from the
dd-trace-cpp branch of benchmarking-platform into .gitlab/benchmarks/.
The benchmarks CI jobs call the local steps instead of cloning the
platform, and the image is now built in-repo from container/ via the
build-ci-images template.

The image pin is a placeholder until build-benchmark-ci-images runs
once on this branch.
@datadog-official

datadog-official Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Pipelines

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 1e2f66e | Docs | Give us feedback!

@pr-commenter

pr-commenter Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-11-13 10:48:03

Comparing candidate commit 1e2f66e in PR branch augusto/cpp-microbenchmarks-in-repo with baseline commit f20b05f 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 marked this pull request as ready for review November 13, 2026 10:59
@igoragoli
igoragoli requested review from a team as code owners November 13, 2026 10:59
@igoragoli
igoragoli requested review from xlamorlette-datadog and removed request for a team November 13, 2026 10:59
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 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-13T11:00:32.703478Z 1e2f66e Draft marked ready
🔒 Security Review ✅ Completed 2026-11-13T11:05:58.848119Z 1e2f66e 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-official datadog-official 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 migrated scripts retain executable permissions and consistent CI references, including the regression gate’s local configuration path. The specialist reported successful syntax and configuration checks.

Was this helpful? React 👍 or 👎

Open Bits AI session

🤖 Bits Code Review · Commit 1e2f66e

@igoragoli
igoragoli marked this pull request as draft November 13, 2026 15:56
@xlamorlette-datadog
xlamorlette-datadog removed their request for review November 16, 2026 09:06
@igoragoli

Copy link
Copy Markdown
Contributor Author

Superseded by #408: that PR carries the migration and the bp-runner conversion in one branch, and the bp-runner flow is verified end to end (green pipelines, parity with the last script-driven run). The step scripts this PR added never land as a result.

@igoragoli igoragoli closed this Nov 16, 2026
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.

1 participant