Skip to content

Commit 38fb5df

Browse files
committed
Auto merge of rust-lang#125771 - Kobzol:ci-datadog-metrics, r=
[CI] Upload CI metrics to DataDog This PR tests integration of Datadog CI custom metrics. My goal is to take various useful statistics (like the duration of stage 1 build, stage 2 build, and test execution) that we already gather into `metrics.json` and upload them as [custom metrics](https://docs.datadoghq.com/continuous_integration/pipelines/custom_commands/) into Datadog, so that we can observe job duration on a more granular level. r? `@jdno`
2 parents 19a1d2b + 2a2de5f commit 38fb5df

File tree

2 files changed

+27
-15
lines changed

2 files changed

+27
-15
lines changed

.github/workflows/ci.yml

+10
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,16 @@ jobs:
212212
# erroring about invalid credentials instead.
213213
if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
214214

215+
- name: Upload Datadog metrics
216+
if: needs.calculate_matrix.outputs.run_type == 'try'
217+
env:
218+
DATADOG_SITE: datadoghq.com
219+
DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
220+
DD_GITHUB_JOB_NAME: ${{ matrix.name }}
221+
run: |
222+
npm install -g @datadog/datadog-ci
223+
datadog-ci measure --level job --measures "xbuild:100" --measures "xtest:50" --measures "xsubmodules:20"
224+
215225
# This job isused to tell bors the final status of the build, as there is no practical way to detect
216226
# when a workflow is successful listening to webhooks only in our current bors implementation (homu).
217227
outcome:

src/ci/github-actions/jobs.yml

+17-15
Original file line numberDiff line numberDiff line change
@@ -80,26 +80,28 @@ envs:
8080
# These jobs automatically inherit envs.pr, to avoid repeating
8181
# it in each job definition.
8282
pr:
83-
- image: mingw-check
84-
<<: *job-linux-4c
85-
- image: mingw-check-tidy
86-
continue_on_error: true
87-
<<: *job-linux-4c
88-
- image: x86_64-gnu-llvm-17
89-
env:
90-
ENABLE_GCC_CODEGEN: "1"
91-
<<: *job-linux-16c
92-
- image: x86_64-gnu-tools
93-
<<: *job-linux-16c
83+
# - image: mingw-check
84+
# <<: *job-linux-4c
85+
# - image: mingw-check-tidy
86+
# continue_on_error: true
87+
# <<: *job-linux-4c
88+
# - image: x86_64-gnu-llvm-17
89+
# env:
90+
# ENABLE_GCC_CODEGEN: "1"
91+
# <<: *job-linux-16c
92+
# - image: x86_64-gnu-tools
93+
# <<: *job-linux-16c
9494

9595
# Jobs that run when you perform a try build (@bors try)
9696
# These jobs automatically inherit envs.try, to avoid repeating
9797
# it in each job definition.
9898
try:
99-
- image: dist-x86_64-linux
100-
env:
101-
CODEGEN_BACKENDS: llvm,cranelift
102-
<<: *job-linux-16c
99+
- image: mingw-check-tidy
100+
<<: *job-linux-4c
101+
# - image: dist-x86_64-linux
102+
# env:
103+
# CODEGEN_BACKENDS: llvm,cranelift
104+
# <<: *job-linux-16c
103105

104106
# Main CI jobs that have to be green to merge a commit into master
105107
# These jobs automatically inherit envs.auto, to avoid repeating

0 commit comments

Comments
 (0)