ci: extract collecting cpu stats into a script

This commit is contained in:
Pietro Albini 2019-10-30 18:56:40 +01:00
parent d623c56f4c
commit e209ee42e9
No known key found for this signature in database
GPG Key ID: 3E06ABE80BAAF19C
2 changed files with 11 additions and 5 deletions

View File

@ -31,11 +31,8 @@ steps:
- bash: src/ci/scripts/should-skip-this.sh
displayName: Decide whether to run this job
# Spawn a background process to collect CPU usage statistics which we'll upload
# at the end of the build. See the comments in the script here for more
# information.
- bash: python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &
displayName: "Collect CPU-usage statistics in the background"
- bash: src/ci/scripts/collect-cpu-stats.sh
displayName: Collect CPU-usage statistics in the background
- bash: src/ci/scripts/dump-environment.sh
displayName: Show the current environment

View File

@ -0,0 +1,9 @@
#!/bin/bash
# Spawn a background process to collect CPU usage statistics which we'll upload
# at the end of the build. See the comments in the script here for more
# information.
set -euo pipefail
IFS=$'\n\t'
python src/ci/cpu-usage-over-time.py &> cpu-usage.csv &