ci(benchmarks): Parellelize microbenchmarks, deprecate dependency on benchmarking-platform repo#4718
Conversation
🎉 All green!❄️ No new flaky tests detected 🎯 Code Coverage (details) 🔗 Commit SHA: 7f770e3 | Docs | Datadog PR Page | Give us feedback! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 065670181e
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
0656701 to
14a6bfb
Compare
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files🚀 New features to boost your workflow:
|
BenchmarksBenchmark execution time: 2026-05-07 15:09:19 Comparing candidate commit 7f770e3 in PR branch Found 0 performance improvements and 0 performance regressions! Performance is the same for 273 metrics, 2 unstable metrics, 1 flaky benchmarks without significant changes.
|
|
Alright! After doing flaky benchmarks audit, I noticed 1 benchmark that was flaky before the change and flaky afterwards (from time to time it reports 5-6% difference) I marked it as known flaky benchmark. Rest of benchmarks have less than 1% difference on reruns.
|
| Scenario | Metric | Significant impact FP | t-test FP | Max bound |
|---|---|---|---|---|
| BenchmarkOTLPTraceWriterFlush | execution_time | 14/21 (66.7%) | 19/21 (90.5%) | 9.77% |
| BenchmarkCaptureStackTrace/10 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkCaptureStackTrace/100 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkCaptureStackTrace/20 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkCaptureStackTrace/200 | execution_time | 0/21 (0.0%) | 5/21 (23.8%) | 0.32% |
| BenchmarkCaptureStackTrace/50 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkConfig/scenario_WithStartSpanConfig | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkConfig/scenario_none | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.00% |
| BenchmarkExtractW3C | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.02% |
| BenchmarkGraphQL/version_baseline/scenario_basic | allocated_mem | 0/21 (0.0%) | 3/21 (14.3%) | 0.00% |
| BenchmarkGraphQL/version_baseline/scenario_basic | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_baseline/scenario_embedded-variable | allocated_mem | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_baseline/scenario_embedded-variable | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_baseline/scenario_with-default-parameter | allocated_mem | 0/21 (0.0%) | 6/21 (28.6%) | 0.00% |
| BenchmarkGraphQL/version_baseline/scenario_with-default-parameter | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_dyngo/scenario_basic | allocated_mem | 0/21 (0.0%) | 4/21 (19.0%) | 0.00% |
| BenchmarkGraphQL/version_dyngo/scenario_basic | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_dyngo/scenario_embedded-variable | allocated_mem | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_dyngo/scenario_embedded-variable | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkGraphQL/version_dyngo/scenario_with-default-parameter | allocated_mem | 0/21 (0.0%) | 6/21 (28.6%) | 0.00% |
| BenchmarkGraphQL/version_dyngo/scenario_with-default-parameter | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkHttpServeTrace | allocated_mem | 0/21 (0.0%) | 3/21 (14.3%) | 0.05% |
| BenchmarkHttpServeTrace | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.14% |
| BenchmarkInjectW3C | execution_time | 0/21 (0.0%) | 3/21 (14.3%) | 0.02% |
| BenchmarkLogs/simple | execution_time | 0/21 (0.0%) | 7/21 (33.3%) | 0.17% |
| BenchmarkLogs/with-stacktrace | execution_time | 0/21 (0.0%) | 10/21 (47.6%) | 0.45% |
| BenchmarkLogs/with-tags | execution_time | 0/21 (0.0%) | 5/21 (23.8%) | 0.31% |
| BenchmarkMetrics/count/get-handle | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkMetrics/count/handle-reused | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkMetrics/distribution/get-handle | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.02% |
| BenchmarkMetrics/distribution/handle-reused | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.00% |
| BenchmarkMetrics/gauge/get-handle | execution_time | 0/21 (0.0%) | 3/21 (14.3%) | 0.14% |
| BenchmarkMetrics/gauge/handle-reused | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkMetrics/rate/get-handle | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkMetrics/rate/handle-reused | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTLPProtoMarshal/1000spans | execution_time | 0/21 (0.0%) | 3/21 (14.3%) | 0.08% |
| BenchmarkOTLPProtoMarshal/100spans | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTLPProtoMarshal/10spans | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTLPProtoMarshal/1span | execution_time | 0/21 (0.0%) | 13/21 (61.9%) | 0.75% |
| BenchmarkOTLPProtoMarshal/rich_spans | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.04% |
| BenchmarkOTLPProtoSize/1000spans | execution_time | 0/21 (0.0%) | 3/21 (14.3%) | 0.03% |
| BenchmarkOTLPProtoSize/100spans | execution_time | 0/21 (0.0%) | 9/21 (42.9%) | 0.12% |
| BenchmarkOTLPProtoSize/10spans | execution_time | 0/21 (0.0%) | 16/21 (76.2%) | 0.36% |
| BenchmarkOTLPProtoSize/1span | execution_time | 0/21 (0.0%) | 5/21 (23.8%) | 1.09% |
| BenchmarkOTLPTraceWriterAdd/10spans | allocated_mem | 0/21 (0.0%) | 4/21 (19.0%) | 0.04% |
| BenchmarkOTLPTraceWriterAdd/10spans | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.10% |
| BenchmarkOTLPTraceWriterAdd/1span | allocated_mem | 0/21 (0.0%) | 4/21 (19.0%) | 0.06% |
| BenchmarkOTLPTraceWriterAdd/1span | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTLPTraceWriterAdd/50spans | allocated_mem | 0/21 (0.0%) | 5/21 (23.8%) | 0.07% |
| BenchmarkOTLPTraceWriterAdd/50spans | execution_time | 0/21 (0.0%) | 3/21 (14.3%) | 0.27% |
| BenchmarkOTLPTraceWriterAdd/5spans | allocated_mem | 0/21 (0.0%) | 1/21 (4.8%) | 0.03% |
| BenchmarkOTLPTraceWriterAdd/5spans | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_1 | allocated_mem | 0/21 (0.0%) | 2/21 (9.5%) | 0.02% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_1 | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.52% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_2 | allocated_mem | 0/21 (0.0%) | 5/21 (23.8%) | 0.08% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_2 | execution_time | 0/21 (0.0%) | 6/21 (28.6%) | 0.30% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_4 | allocated_mem | 0/21 (0.0%) | 10/21 (47.6%) | 0.23% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_4 | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.27% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_8 | allocated_mem | 0/21 (0.0%) | 2/21 (9.5%) | 0.04% |
| BenchmarkOTLPTraceWriterConcurrent/concurrency_8 | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.27% |
| BenchmarkOTLPTraceWriterFlush | allocated_mem | 0/21 (0.0%) | 6/21 (28.6%) | 0.00% |
| BenchmarkOTelApiWithCustomTags/datadog_otel_api | allocated_mem | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTelApiWithCustomTags/datadog_otel_api | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkOTelApiWithCustomTags/otel_api | allocated_mem | 0/21 (0.0%) | 5/21 (23.8%) | 0.08% |
| BenchmarkOTelApiWithCustomTags/otel_api | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelLogs | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/count/get-handle | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/count/handle-reused | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/distribution/get-handle | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/distribution/handle-reused | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.11% |
| BenchmarkParallelMetrics/gauge/get-handle | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/gauge/handle-reused | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/rate/get-handle | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkParallelMetrics/rate/handle-reused | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPartialFlushing/Disabled | allocated_mem | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPartialFlushing/Disabled | allocations | 0/21 (0.0%) | 1/21 (4.8%) | 0.00% |
| BenchmarkPartialFlushing/Disabled | avgHeapInUse(Mb) | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPartialFlushing/Disabled | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPartialFlushing/Enabled | allocated_mem | 0/21 (0.0%) | 6/21 (28.6%) | 0.28% |
| BenchmarkPartialFlushing/Enabled | allocations | 0/21 (0.0%) | 1/21 (4.8%) | 0.01% |
| BenchmarkPartialFlushing/Enabled | avgHeapInUse(Mb) | 0/21 (0.0%) | 3/21 (14.3%) | 1.13% |
| BenchmarkPartialFlushing/Enabled | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/detailed_1000spans/v0.4 | allocated_mem | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/detailed_1000spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/detailed_1000spans/v1.0 | allocated_mem | 0/21 (0.0%) | 8/21 (38.1%) | 0.08% |
| BenchmarkPayloadVersions/detailed_1000spans/v1.0 | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.05% |
| BenchmarkPayloadVersions/detailed_100spans/v0.4 | execution_time | 0/21 (0.0%) | 7/21 (33.3%) | 0.25% |
| BenchmarkPayloadVersions/detailed_100spans/v1.0 | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.06% |
| BenchmarkPayloadVersions/detailed_10spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/detailed_10spans/v1.0 | execution_time | 0/21 (0.0%) | 7/21 (33.3%) | 0.37% |
| BenchmarkPayloadVersions/detailed_1spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/detailed_1spans/v1.0 | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.09% |
| BenchmarkPayloadVersions/metastruct_1000spans/v1.0 | allocated_mem | 0/21 (0.0%) | 7/21 (33.3%) | 0.00% |
| BenchmarkPayloadVersions/metastruct_1000spans/v1.0 | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.00% |
| BenchmarkPayloadVersions/metastruct_100spans/v1.0 | allocated_mem | 0/21 (0.0%) | 3/21 (14.3%) | 0.00% |
| BenchmarkPayloadVersions/metastruct_100spans/v1.0 | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.03% |
| BenchmarkPayloadVersions/metastruct_10spans/v1.0 | allocated_mem | 0/21 (0.0%) | 10/21 (47.6%) | 0.00% |
| BenchmarkPayloadVersions/metastruct_10spans/v1.0 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/metastruct_1spans/v1.0 | allocated_mem | 0/21 (0.0%) | 1/21 (4.8%) | 0.00% |
| BenchmarkPayloadVersions/metastruct_1spans/v1.0 | execution_time | 0/21 (0.0%) | 3/21 (14.3%) | 0.27% |
| BenchmarkPayloadVersions/simple_1000spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/simple_1000spans/v1.0 | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.00% |
| BenchmarkPayloadVersions/simple_100spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/simple_100spans/v1.0 | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.28% |
| BenchmarkPayloadVersions/simple_10spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/simple_10spans/v1.0 | execution_time | 0/21 (0.0%) | 4/21 (19.0%) | 0.13% |
| BenchmarkPayloadVersions/simple_1spans/v0.4 | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkPayloadVersions/simple_1spans/v1.0 | execution_time | 0/21 (0.0%) | 13/21 (61.9%) | 0.65% |
| BenchmarkSampleWAFContext | allocated_mem | 0/21 (0.0%) | 9/21 (42.9%) | 0.00% |
| BenchmarkSampleWAFContext | execution_time | 0/21 (0.0%) | 10/21 (47.6%) | 0.27% |
| BenchmarkSerializeSpanLinksInMeta | execution_time | 0/21 (0.0%) | 7/21 (33.3%) | 0.18% |
| BenchmarkSetTagMetric | execution_time | 0/21 (0.0%) | 7/21 (33.3%) | 0.23% |
| BenchmarkSetTagString | execution_time | 0/21 (0.0%) | 8/21 (38.1%) | 0.22% |
| BenchmarkSetTagStringPtr | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.10% |
| BenchmarkSetTagStringer | execution_time | 0/21 (0.0%) | 5/21 (23.8%) | 0.12% |
| BenchmarkSingleSpanRetention/no-rules | allocated_mem | 0/21 (0.0%) | 4/21 (19.0%) | 0.00% |
| BenchmarkSingleSpanRetention/no-rules | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkSingleSpanRetention/with-rules/match-all | allocated_mem | 0/21 (0.0%) | 7/21 (33.3%) | 0.00% |
| BenchmarkSingleSpanRetention/with-rules/match-all | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkSingleSpanRetention/with-rules/match-half | allocated_mem | 0/21 (0.0%) | 3/21 (14.3%) | 0.00% |
| BenchmarkSingleSpanRetention/with-rules/match-half | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkStartRequestSpan | execution_time | 0/21 (0.0%) | 2/21 (9.5%) | 0.06% |
| BenchmarkStartSpan | execution_time | 0/21 (0.0%) | 1/21 (4.8%) | 0.02% |
| BenchmarkStartSpanConfig/scenario_WithStartSpanConfig | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkStartSpanConfig/scenario_none | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
| BenchmarkTracerAddSpans | execution_time | 0/21 (0.0%) | 0/21 (0.0%) | 0.00% |
Significant Impact FP Rate: 0.5%
T-test FP Rate: 13.5%
Max Significant Impact Bound: 9.77%
p95 Significant Impact Bound: 0.43%
darccio
left a comment
There was a problem hiding this comment.
Solid CI improvement. Some nits added.
Co-authored-by: Dario Castañé <[email protected]>
Co-authored-by: Dario Castañé <[email protected]>

What does this PR do?
It restructures the benchmarks CI so that everything needed to run microbenchmarks lives inside dd-trace-go instead of being driven by an external clone of the benchmarking-platform repo, and parallelizes the microbenchmark run across multiple CI jobs.
Key changes
Self-contained benchmark configuration under
.gitlab/benchmarks/micro/suite owns its owngitlab-ci.yml,bp-runner.yml, andcontainer/(Dockerfile + install scripts) instead of fetching a job spec from the externalbenchmarking-platformrepo.macro/andtest-apps/are split into their own subdirectories alongsidemicro/.pr-gate.thresholds.yml(PR regression gates) and renames the release SLOs file topre-release-gate.slos.yml.Parallelized microbenchmarks
microbenchmarks-Njobs (groups of benchmarks), each running on a dedicated 48-core bare-metal runner (runner:apm-k8s-m8g-metal).bp-runner.ymlparallelizes scenarios across CPU cores 4–47 (cores 0–3 reserved for kernel/background), withCPUS_PER_BENCHMARK=1andREPETITIONS=10.pr-performance-gatesjob aggregates results and fails the pipeline on regressions above the configured threshold.FLAKY_BENCHMARKS_REGEXto mark known-flaky benchmarks (still run/reported, but don't fail the gate).Deprecation of
benchmarking-platformrepo coupling.gitlab/bp-runner.yml,.gitlab/child_pipeline.yml.tpl, and.gitlab/generate_config.go(the dynamic child-pipeline generator that pulled jobs from the external repo)..gitlab-ci.ymland.gitlab/benchmarks.yml; benchmark suites are now included directly from this repo..gitlab/benchmarks/micro/container/(Go base +bp-runner/bp-analyzer/bp-githubviabp-install) and pinned viaBENCHMARKS_CI_IMAGE.Documentation
go-go-prof-app-parallel(fromapm-sdks-benchmarks) plugs in.bp-runner..env.exampleand.gitignorefor local runs.Misc
CODEOWNERSfor the new paths.Motivation
Reviewer's Checklist
make lintlocally.make testlocally.make generatelocally.make fix-moduleslocally.Unsure? Have a question? Request a review!