about summary refs log tree commit diff
path: root/.github/workflows
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-10-02 13:56:55 +0000
committerbors <bors@rust-lang.org>2024-10-02 13:56:55 +0000
commit44722bd9ba50426191f78d12138a2ae1a12affe7 (patch)
treead238bec4071cff1147a3fa5fc49cdf01893cd91 /.github/workflows
parent360f7d7b731c508c88b7b56921a92d281c05dbf7 (diff)
parentc1c0bd7a251865e82b1e8d0292451f78f19f22a8 (diff)
downloadrust-44722bd9ba50426191f78d12138a2ae1a12affe7.tar.gz
rust-44722bd9ba50426191f78d12138a2ae1a12affe7.zip
Auto merge of #125771 - Kobzol:ci-datadog-metrics, r=jdno
[CI] Upload average CPU utilization of CI jobs to DataDog

This PR adds a new CI step that uploads the average CPU utilization of the current GH job to Datadog. I want to add more metrics in follow-up PRs.

r? `@jdno`

try-job: dist-i686-msvc
try-job: aarch64-apple
try-job: x86_64-gnu-llvm-18
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml10
1 files changed, 10 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 8032154a736..b6dc27f1234 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -212,6 +212,16 @@ jobs:
         # erroring about invalid credentials instead.
         if: github.event_name == 'push' || env.DEPLOY == '1' || env.DEPLOY_ALT == '1'
 
+      - name: upload job metrics to DataDog
+        if: needs.calculate_matrix.outputs.run_type != 'pr'
+        env:
+          DATADOG_SITE: datadoghq.com
+          DATADOG_API_KEY: ${{ secrets.DATADOG_API_KEY }}
+          DD_GITHUB_JOB_NAME: ${{ matrix.name }}
+        run: |
+          npm install -g @datadog/datadog-ci@^2.x.x
+          python3 src/ci/scripts/upload-build-metrics.py build/cpu-usage.csv
+
   # This job isused to tell bors the final status of the build, as there is no practical way to detect
   # when a workflow is successful listening to webhooks only in our current bors implementation (homu).
   outcome: