From f58b495860db5a7ba9ee38006188000b4eb9d3f8 Mon Sep 17 00:00:00 2001 From: Alexandre Rulleau Date: Wed, 15 Apr 2026 15:17:07 +0200 Subject: [PATCH 1/6] feat(benchmarks): add PHP parallel benchmarks to benchmarks pipeline (LANGPLAT-883) --- .gitlab/benchmarks.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index cf59e166688..26d096a85da 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -258,3 +258,21 @@ notify-slo-breaches: rules: *pre-release-performance-quality-gates-rules variables: CHANNEL: "guild-dd-php" + +apm-sdk-benchmarks: + stage: benchmarks + when: manual + allow_failure: true + # No `needs:` here — unlike dd-trace-py which uploads per-pipeline wheels to + # S3 (keyed by CI_PIPELINE_ID), dd-trace-php publishes to S3 keyed by VERSION + # string only. The apm-sdks-benchmarks fetch script downloads the latest + # GitHub release instead of a specific pipeline build. + trigger: + project: DataDog/apm-reliability/apm-sdks-benchmarks + branch: main + variables: + # PARENT_PIPELINE_ID (not CI_PIPELINE_ID): benchmarks.yml runs as a child + # pipeline, so CI_PIPELINE_ID here is the child pipeline ID. PARENT_PIPELINE_ID + # is explicitly forwarded from the parent pipeline in .gitlab-ci.yml and + # identifies the main dd-trace-php pipeline that triggered this run. + TARGET_REF: $PARENT_PIPELINE_ID From bea5e8e86d960ea9236b774658da02cdfaea9150 Mon Sep 17 00:00:00 2001 From: Alexandre Rulleau Date: Thu, 16 Apr 2026 15:39:21 +0200 Subject: [PATCH 2/6] feat(benchmarks): add PHP parallel benchmarks via apm-sdks-benchmarks include Switch from a trigger job to a GitLab CI include, pulling the PHP Laravel Realworld parallel benchmark jobs directly into this pipeline. Adds two new stages: php-laravel-realworld-parallel and php-laravel-realworld-parallel-slo. --- .gitlab/benchmarks.yml | 25 +++++++------------------ 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index 26d096a85da..3d43d943bc4 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -3,6 +3,13 @@ include: file: 'images/templates/gitlab/check-slo-breaches.template.yml' - project: 'DataDog/benchmarking-platform-tools' file: 'images/templates/gitlab/notify-slo-breaches.template.yml' + - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' + file: '.gitlab/ci-php-laravel-realworld-parallel.yml' + ref: 'main' + +stages: + - php-laravel-realworld-parallel + - php-laravel-realworld-parallel-slo variables: BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-php-82-dev @@ -258,21 +265,3 @@ notify-slo-breaches: rules: *pre-release-performance-quality-gates-rules variables: CHANNEL: "guild-dd-php" - -apm-sdk-benchmarks: - stage: benchmarks - when: manual - allow_failure: true - # No `needs:` here — unlike dd-trace-py which uploads per-pipeline wheels to - # S3 (keyed by CI_PIPELINE_ID), dd-trace-php publishes to S3 keyed by VERSION - # string only. The apm-sdks-benchmarks fetch script downloads the latest - # GitHub release instead of a specific pipeline build. - trigger: - project: DataDog/apm-reliability/apm-sdks-benchmarks - branch: main - variables: - # PARENT_PIPELINE_ID (not CI_PIPELINE_ID): benchmarks.yml runs as a child - # pipeline, so CI_PIPELINE_ID here is the child pipeline ID. PARENT_PIPELINE_ID - # is explicitly forwarded from the parent pipeline in .gitlab-ci.yml and - # identifies the main dd-trace-php pipeline that triggered this run. - TARGET_REF: $PARENT_PIPELINE_ID From 1d632e284f54b95d4bbb792284345a5abfc54a57 Mon Sep 17 00:00:00 2001 From: Alexandre Rulleau Date: Fri, 19 Jun 2026 13:05:14 +0200 Subject: [PATCH 3/6] feat(benchmarks): include all 3 PHP parallel benchmarks + pass tracer artifacts (LANGPLAT-883) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Extends the included apm-sdks-benchmarks PHP jobs from just Laravel to the full triplet (Laravel + Symfony + WordPress), and wires the locally- built tracer into each by: - Adding a `needs:` declaration to the 3 main benchmark jobs that pulls the `package extension` and `datadog-setup.php` artifacts from the parent dd-trace-php pipeline. - Exporting DD_TRACER_ARTIFACT_DIR=$CI_PROJECT_DIR/packages so the apm-sdks-benchmarks side (fetch-tracing-libs.sh + each framework's start-app.sh) installs the in-PR tracer build via `datadog-setup.php --file dd-library-php-*.tar.gz` instead of pulling the latest GitHub release. Standalone runs of the apm-sdks-benchmarks pipeline are unaffected — when the env var is unset, the existing GitHub-release path runs. --- .gitlab/benchmarks.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index 3d43d943bc4..97c7f26dc2b 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -6,10 +6,47 @@ include: - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' file: '.gitlab/ci-php-laravel-realworld-parallel.yml' ref: 'main' + - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' + file: '.gitlab/ci-php-symfony-realworld-parallel.yml' + ref: 'main' + - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' + file: '.gitlab/ci-php-wordpress-parallel.yml' + ref: 'main' stages: - php-laravel-realworld-parallel - php-laravel-realworld-parallel-slo + - php-symfony-realworld-parallel + - php-symfony-realworld-parallel-slo + - php-wordpress-parallel + - php-wordpress-parallel-slo + +linux-php-laravel-realworld-parallel: + needs: + - job: "package extension: [amd64, x86_64-unknown-linux-gnu]" + artifacts: true + - job: datadog-setup.php + artifacts: true + variables: + DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" + +linux-php-symfony-realworld-parallel: + needs: + - job: "package extension: [amd64, x86_64-unknown-linux-gnu]" + artifacts: true + - job: datadog-setup.php + artifacts: true + variables: + DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" + +linux-php-wordpress-parallel: + needs: + - job: "package extension: [amd64, x86_64-unknown-linux-gnu]" + artifacts: true + - job: datadog-setup.php + artifacts: true + variables: + DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" variables: BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-php-82-dev From 6005a0c121a647096285a85c7b781d3aef145d98 Mon Sep 17 00:00:00 2001 From: Alexandre Rulleau Date: Wed, 24 Jun 2026 14:07:33 +0200 Subject: [PATCH 4/6] ci(benchmarks): point PHP includes at the apm-sdks-benchmarks PR branch (LANGPLAT-883) Temporary pin until DataDog/apm-sdks-benchmarks#115 merges to main: until then the 3 PHP yamls only exist on the leiyks/LANGPLAT-883-php-competitor- benchmarks branch, and the parallel-benchmark-template version on main doesn't honor DD_TRACER_ARTIFACT_DIR yet. Pointing both the include refs and APM_SDKS_BENCHMARKS_BRANCH at the PR branch lets us validate the end-to-end artifact-passing flow now; flip both back to 'main' once apm-sdks-benchmarks#115 lands. --- .gitlab/benchmarks.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index b84be3743d9..9a150321ee5 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -5,13 +5,13 @@ include: file: 'images/templates/gitlab/notify-slo-breaches.template.yml' - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' file: '.gitlab/ci-php-laravel-realworld-parallel.yml' - ref: 'main' + ref: 'leiyks/LANGPLAT-883-php-competitor-benchmarks' - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' file: '.gitlab/ci-php-symfony-realworld-parallel.yml' - ref: 'main' + ref: 'leiyks/LANGPLAT-883-php-competitor-benchmarks' - project: 'DataDog/apm-reliability/apm-sdks-benchmarks' file: '.gitlab/ci-php-wordpress-parallel.yml' - ref: 'main' + ref: 'leiyks/LANGPLAT-883-php-competitor-benchmarks' stages: - php-laravel-realworld-parallel @@ -49,6 +49,7 @@ linux-php-wordpress-parallel: DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" variables: + APM_SDKS_BENCHMARKS_BRANCH: "leiyks/LANGPLAT-883-php-competitor-benchmarks" BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-php-82-dev # The Dockerfile to this image is located at: # https://github.com/DataDog/benchmarking-platform/tree/dd-trace-php From f1d0240cc2243f42f98cf4736d50d9e480b24057 Mon Sep 17 00:00:00 2001 From: Alexandre Rulleau Date: Wed, 24 Jun 2026 14:19:34 +0200 Subject: [PATCH 5/6] ci(benchmarks): move PHP stages into the generated package list (LANGPLAT-883) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The benchmarks.yml file is included into the child pipeline alongside package-gen.yml (generated by generate-package.php). GitLab merges those two files, and when both declare a top-level "stages:" block the last one wins — our PR's stages: list was overriding package-gen's, breaking existing jobs like "package-oci: [linux, amd64]" that target the shared-pipeline stage. Fix: drop the stages: block from benchmarks.yml and append the 6 PHP stages to the single source of truth in generate-package.php. The child pipeline now exposes the union of every stage anyone declares. --- .gitlab/benchmarks.yml | 8 -------- .gitlab/generate-package.php | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index 9a150321ee5..5abc60efa9e 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -13,14 +13,6 @@ include: file: '.gitlab/ci-php-wordpress-parallel.yml' ref: 'leiyks/LANGPLAT-883-php-competitor-benchmarks' -stages: - - php-laravel-realworld-parallel - - php-laravel-realworld-parallel-slo - - php-symfony-realworld-parallel - - php-symfony-realworld-parallel-slo - - php-wordpress-parallel - - php-wordpress-parallel-slo - linux-php-laravel-realworld-parallel: needs: - job: "package extension: [amd64, x86_64-unknown-linux-gnu]" diff --git a/.gitlab/generate-package.php b/.gitlab/generate-package.php index bc760c9e2b4..e40af5a8757 100644 --- a/.gitlab/generate-package.php +++ b/.gitlab/generate-package.php @@ -85,6 +85,12 @@ - notify - verify - shared-pipeline # OCI packaging + - php-laravel-realworld-parallel + - php-laravel-realworld-parallel-slo + - php-symfony-realworld-parallel + - php-symfony-realworld-parallel-slo + - php-wordpress-parallel + - php-wordpress-parallel-slo - pre-release - release From f3e37b713c793c543331d742ecb0af53095164e2 Mon Sep 17 00:00:00 2001 From: Alexandre Rulleau Date: Wed, 24 Jun 2026 15:38:53 +0200 Subject: [PATCH 6/6] ci(benchmarks): set APM_SDKS_BENCHMARKS_BRANCH at job level (LANGPLAT-883) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The included .parallel-benchmark-template defines APM_SDKS_BENCHMARKS_BRANCH="main" in its own job-level variables block, which overrides top-level variables. Setting our PR-branch override at the top level was a no-op — the template's job-level default still won the merge, so the runtime clone targeted main (where tracing-libs/php/ fetch-tracing-libs.sh doesn't exist yet) and the job died with 'No such file or directory'. Move the override into each of the 3 PHP benchmark jobs' own variables blocks so it actually shadows the template default. Drop the top-level variable that wasn't doing anything. --- .gitlab/benchmarks.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitlab/benchmarks.yml b/.gitlab/benchmarks.yml index 5abc60efa9e..abdf9255006 100644 --- a/.gitlab/benchmarks.yml +++ b/.gitlab/benchmarks.yml @@ -20,6 +20,7 @@ linux-php-laravel-realworld-parallel: - job: datadog-setup.php artifacts: true variables: + APM_SDKS_BENCHMARKS_BRANCH: "leiyks/LANGPLAT-883-php-competitor-benchmarks" DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" linux-php-symfony-realworld-parallel: @@ -29,6 +30,7 @@ linux-php-symfony-realworld-parallel: - job: datadog-setup.php artifacts: true variables: + APM_SDKS_BENCHMARKS_BRANCH: "leiyks/LANGPLAT-883-php-competitor-benchmarks" DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" linux-php-wordpress-parallel: @@ -38,10 +40,10 @@ linux-php-wordpress-parallel: - job: datadog-setup.php artifacts: true variables: + APM_SDKS_BENCHMARKS_BRANCH: "leiyks/LANGPLAT-883-php-competitor-benchmarks" DD_TRACER_ARTIFACT_DIR: "$CI_PROJECT_DIR/packages" variables: - APM_SDKS_BENCHMARKS_BRANCH: "leiyks/LANGPLAT-883-php-competitor-benchmarks" BASE_CI_IMAGE: 486234852809.dkr.ecr.us-east-1.amazonaws.com/ci/benchmarking-platform:dd-trace-php-82-dev # The Dockerfile to this image is located at: # https://github.com/DataDog/benchmarking-platform/tree/dd-trace-php