about summary refs log tree commit diff
path: root/src/ci/scripts
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2024-12-05 23:42:57 +0000
committerbors <bors@rust-lang.org>2024-12-05 23:42:57 +0000
commit706141b8d9090228343340378b1d4a2b095fa1fb (patch)
treee87ce86ba71331485e2d1140a2684345050f220f /src/ci/scripts
parentc94848c046d29f9a80c09aae758e27e418a289f2 (diff)
parent5dc05a8d01d0608c38061b839f7da77e599f6479 (diff)
downloadrust-706141b8d9090228343340378b1d4a2b095fa1fb.tar.gz
rust-706141b8d9090228343340378b1d4a2b095fa1fb.zip
Auto merge of #133940 - GuillaumeGomez:rollup-nm1cz5j, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #132155 (Always display first line of impl blocks even when collapsed)
 - #133256 (CI: use free runners for i686-gnu jobs)
 - #133607 (implement checks for tail calls)
 - #133821 (Replace black with ruff in `tidy`)
 - #133827 (CI: rfl: move job forward to Linux v6.13-rc1)
 - #133910 (Normalize target-cpus.rs stdout test for LLVM changes)
 - #133921 (Adapt codegen tests for NUW inference)
 - #133936 (Avoid fetching the anon const hir node that is already available)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'src/ci/scripts')
-rw-r--r--src/ci/scripts/upload-build-metrics.py21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/ci/scripts/upload-build-metrics.py b/src/ci/scripts/upload-build-metrics.py
index a95e0949d70..23061884a39 100644
--- a/src/ci/scripts/upload-build-metrics.py
+++ b/src/ci/scripts/upload-build-metrics.py
@@ -19,6 +19,7 @@ $ python3 upload-build-metrics.py <path-to-CPU-usage-CSV>
 
 `path-to-CPU-usage-CSV` is a path to a CSV generated by the `src/ci/cpu-usage-over-time.py` script.
 """
+
 import argparse
 import csv
 import os
@@ -31,7 +32,7 @@ from typing import List
 def load_cpu_usage(path: Path) -> List[float]:
     usage = []
     with open(path) as f:
-        reader = csv.reader(f, delimiter=',')
+        reader = csv.reader(f, delimiter=",")
         for row in reader:
             # The log might contain incomplete rows or some Python exception
             if len(row) == 2:
@@ -50,25 +51,21 @@ def upload_datadog_measure(name: str, value: float):
     print(f"Metric {name}: {value:.4f}")
 
     datadog_cmd = "datadog-ci"
-    if os.getenv("GITHUB_ACTIONS") is not None and sys.platform.lower().startswith("win"):
+    if os.getenv("GITHUB_ACTIONS") is not None and sys.platform.lower().startswith(
+        "win"
+    ):
         # Due to weird interaction of MSYS2 and Python, we need to use an absolute path,
         # and also specify the ".cmd" at the end. See https://github.com/rust-lang/rust/pull/125771.
         datadog_cmd = "C:\\npm\\prefix\\datadog-ci.cmd"
 
-    subprocess.run([
-        datadog_cmd,
-        "measure",
-        "--level", "job",
-        "--measures", f"{name}:{value}"
-    ],
-        check=False
+    subprocess.run(
+        [datadog_cmd, "measure", "--level", "job", "--measures", f"{name}:{value}"],
+        check=False,
     )
 
 
 if __name__ == "__main__":
-    parser = argparse.ArgumentParser(
-        prog="DataDog metric uploader"
-    )
+    parser = argparse.ArgumentParser(prog="DataDog metric uploader")
     parser.add_argument("cpu-usage-history-csv")
     args = parser.parse_args()