Skip to content

Commit e209ee4

Browse files
committed
ci: extract collecting cpu stats into a script
1 parent d623c56 commit e209ee4

File tree

2 files changed

+11
-5
lines changed

2 files changed

+11
-5
lines changed

src/ci/azure-pipelines/steps/run.yml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,8 @@ steps:
3131
- bash: src/ci/scripts/should-skip-this.sh
3232
displayName: Decide whether to run this job
3333

34-
# Spawn a background process to collect CPU usage statistics which we'll upload
35-
# at the end of the build. See the comments in the script here for more
36-
# information.
37-
- bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
38-
displayName: "Collect CPU-usage statistics in the background"
34+
- bash: src/ci/scripts/collect-cpu-stats.sh
35+
displayName: Collect CPU-usage statistics in the background
3936

4037
- bash: src/ci/scripts/dump-environment.sh
4138
displayName: Show the current environment

src/ci/scripts/collect-cpu-stats.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#!/bin/bash
2+
# Spawn a background process to collect CPU usage statistics which we'll upload
3+
# at the end of the build. See the comments in the script here for more
4+
# information.
5+
6+
set -euo pipefail
7+
IFS=$'\n\t'
8+
9+
python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &

0 commit comments

Comments
 (0)