11variables :
2- PREPARE_IMAGE : registry.ddbuild.io/images/benchmarking-platform-tools-ubuntu:latest
32 DD_OCTO_STS_IMAGE : registry.ddbuild.io/images/dd-octo-sts-ci-base:2025.06-1
43
5- .benchmark_job :
6- extends : .deploy-sa
4+ # Bridge job: triggers the BP pipeline and blocks until it completes.
5+ # Bridge jobs cannot appear in other jobs' needs: — downstream jobs use
6+ # stage ordering (post-benchmarks stage runs after benchmarks stage).
7+ benchmarks-trigger :
78 stage : benchmarks
8- timeout : 6h
9- variables :
10- ITERATIONS : " ${BENCHMARK_ITERATIONS:-1}"
11- MODES : " ${BENCHMARK_MODES:-cpu,wall,alloc,memleak}"
9+ # Bridge jobs cannot have before_script, so CANCELLED is checked via rules.
10+ # interruptible: false prevents orphaning the BP downstream pipeline on push.
11+ interruptible : false
1212 needs :
1313 - job : get-versions
1414 artifacts : true
1515 - job : deploy-artifact
1616 artifacts : false
1717 rules :
18+ - if : ' $CANCELLED == "true"'
19+ when : never
1820 - if : ' $JDK_VERSION != null || $DEBUG_LEVEL != null || $HASH != null || $DOWNSTREAM != null'
1921 when : never
2022 - if : ' $CI_PIPELINE_SOURCE == "schedule"'
@@ -24,113 +26,51 @@ variables:
2426 - if : ' $CI_PIPELINE_SOURCE == "web"'
2527 when : manual
2628 allow_failure : true
27- # Run automatically and non-blocking on any other source (push/trigger/api/
28- # etc.) — mirrors the integration-test rules. The before_script CANCELLED
29- # gate skips branches with no open PR.
29+ # Run automatically and non-blocking on any other source (push/trigger/api/etc.)
3030 - when : on_success
3131 allow_failure : true
32- script : |
33- # setup the env
34- export ARTIFACTS_DIR="$(pwd)/reports" && (mkdir "${ARTIFACTS_DIR}" || :)
35- export CANDIDATE_VERSION=${CURRENT_VERSION}
36- export BASELINE_VERSION=${PREVIOUS_VERSION}
37- export PLATFORM_DIR=".benchmarks/platform"
38-
39- # check for missing candidate version
40- if [ -z "${CANDIDATE_VERSION}" ]; then echo "Missing candidate version. Skipping."; exit 0; fi
41-
42- # fetch the common platform scripts
43- git -c url."https://gitlab-ci-token:${CI_JOB_TOKEN}@gitlab.ddbuild.io/DataDog/".insteadOf="https://github.com/DataDog/" \
44- clone --branch dd-trace-go https://github.com/DataDog/benchmarking-platform ${PLATFORM_DIR}
45-
46- # apply the specific step scripts
47- cp -r .gitlab/benchmarks/steps/* ${PLATFORM_DIR}/steps/
48- chmod a+x ${PLATFORM_DIR}/steps/*
49-
50- # check for mode validity
51- ${PLATFORM_DIR}/steps/check_modes.sh
52- if [ "$(cat .job_status)" == "SKIP" ]; then exit 0; fi
53-
54- # run benchmarks
55- ${PLATFORM_DIR}/steps/capture-hardware-software-info.sh
56- ${PLATFORM_DIR}/steps/run-benchmarks.sh
57- ${PLATFORM_DIR}/steps/analyze-results.sh
58- ${PLATFORM_DIR}/steps/upload-results-to-s3.sh
59- parallel :
60- matrix :
61- - RUN_MODE : ["cpu", "wall", "alloc", "memleak", "cpu,wall", "memleak,alloc", "cpu,wall,alloc,memleak"]
62- artifacts :
63- when : always
64- name : " reports"
65- paths :
66- - reports/
67- expire_in : 3 months
68-
69- benchmarks-candidate-amd64 :
70- extends : .benchmark_job
71- tags : ["arch:amd64"]
72- image : $BENCHMARK_IMAGE_AMD64
73-
74- benchmarks-candidate-aarch64 :
75- extends : .benchmark_job
76- tags : ["arch:arm64"]
77- image : $BENCHMARK_IMAGE_ARM64
7832 variables :
79- KUBERNETES_MEMORY_REQUEST : 200Gi
80- KUBERNETES_MEMORY_LIMIT : 200Gi
33+ CANDIDATE_VERSION : " ${CURRENT_VERSION}"
34+ BASELINE_VERSION : " ${PREVIOUS_VERSION}"
35+ BENCHMARK_ITERATIONS : " ${BENCHMARK_ITERATIONS:-5}"
36+ BENCHMARK_MODES : " ${BENCHMARK_MODES:-cpu,wall,alloc,memleak}"
37+ DDPROF_COMMIT_SHA : " ${CI_COMMIT_SHA}"
38+ DDPROF_COMMIT_BRANCH : " ${CI_COMMIT_BRANCH}"
39+ UPSTREAM_PROJECT_NAME : " java-profiler"
40+ UPSTREAM_BRANCH : " ${CI_COMMIT_BRANCH}"
41+ UPSTREAM_PIPELINE_ID : " ${CI_PIPELINE_ID}"
42+ trigger :
43+ project : DataDog/apm-reliability/benchmarking-platform
44+ branch : java-profiler
45+ strategy : depend
8146
82- post-benchmarks-pr-comment :
83- extends : .retry-config
84- stage : benchmarks
85- tags : ["arch:arm64"]
86- image : registry.ddbuild.io/images/dd-octo-sts-ci-base:2025.06-1
87- id_tokens :
88- DDOCTOSTS_ID_TOKEN :
89- aud : dd-octo-sts
90- needs :
91- - job : prepare:start
92- artifacts : true
93- - job : benchmarks-candidate-amd64
94- artifacts : true
95- - job : benchmarks-candidate-aarch64
96- artifacts : true
97- rules :
98- - if : ' $JDK_VERSION != null || $DEBUG_LEVEL != null || $HASH != null || $DOWNSTREAM != null'
99- when : never
100- - if : ' $CI_PIPELINE_SOURCE == "schedule"'
101- when : never
102- - if : ' $CI_PIPELINE_SOURCE == "merge_request_event"'
103- when : never
104- # Always run when the candidate jobs ran, regardless of source, so results
105- # are posted back to the PR.
106- - when : always
107- timeout : 5m
108- script :
109- - .gitlab/benchmarks/post-pr-comment.sh reports
110- allow_failure : true
11147
11248publish-benchmark-gh-pages :
113- stage : benchmarks
49+ stage : post- benchmarks
11450 tags : ["arch:arm64"]
115- image : registry.ddbuild.io/images/dd-octo-sts-ci-base:2025.06-1
51+ image : $DD_OCTO_STS_IMAGE
11652 id_tokens :
11753 DDOCTOSTS_ID_TOKEN :
11854 aud : dd-octo-sts
119- needs :
120- - job : benchmarks-candidate-amd64
121- artifacts : true
122- - job : benchmarks-candidate-aarch64
123- artifacts : true
55+ # Serialize concurrent GH Pages pushes. publish-gh-pages.sh uses
56+ # 'git push --force'; two concurrent pushes race and the slower one
57+ # silently discards the faster one's history update.
58+ resource_group : gh-pages-publish
12459 rules :
12560 - if : ' $CI_PIPELINE_SOURCE == "schedule"'
12661 when : never
62+ - if : ' $CANCELLED == "true"'
63+ when : never
64+ - if : ' $JDK_VERSION != null || $DEBUG_LEVEL != null || $HASH != null || $DOWNSTREAM != null'
65+ when : never
12766 - if : ' $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH || $CI_COMMIT_BRANCH == "main"'
12867 when : always
129- timeout : 10m
68+ timeout : 15m
13069 script :
131- - ./.gitlab/benchmarks/publish-gh-pages.sh
70+ - mkdir -p reports
71+ - .gitlab/benchmarks/download-bp-reports.sh reports
72+ - ./.gitlab/benchmarks/publish-gh-pages.sh reports
13273 allow_failure : true
13374
13475include :
13576 - local : .gitlab/common.yml
136- - local : .gitlab/benchmarks/images.yml
0 commit comments