Skip to content

Commit

Permalink
ci: extract collecting cpu stats into a script
Browse files Browse the repository at this point in the history
  • Loading branch information
pietroalbini committed Nov 12, 2019
1 parent d623c56 commit e209ee4
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/ci/azure-pipelines/steps/run.yml
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions src/ci/scripts/collect-cpu-stats.sh
@@ -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 &

0 comments on commit e209ee4

Please sign in to comment.