summaryrefslogtreecommitdiff
path: root/contrib/cirrus/logcollector.sh
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2020-10-22 08:19:31 -0400
committerChris Evich <cevich@redhat.com>2020-11-09 14:32:39 -0500
commitf44af2056138cbf64c1e70a99d62336ca3d949a3 (patch)
treefff9569a63f233a95b2c4f99658a0855d694345d /contrib/cirrus/logcollector.sh
parentabc77b42219aaccf5cf1a1c9f1202c1525c0d807 (diff)
downloadpodman-f44af2056138cbf64c1e70a99d62336ca3d949a3.tar.gz
podman-f44af2056138cbf64c1e70a99d62336ca3d949a3.tar.bz2
podman-f44af2056138cbf64c1e70a99d62336ca3d949a3.zip
Cirrus: Detailed CPU/Memory/Time runner.sh stats
On several occasions, there have been questions about CPU/Memory/IO trends in testing over time. Start collecting this data for all jobs, using a common/stable format so that trending analysis can be performed within/across multiple Cirrus-CI builds. This PR doesn't add any related tooling, it simply arranges for the collection of the data. Stats generation is done at the orchestration level to guarantee they reflect everything happening inside `runner.sh`. For example, the container-based tests re-exec `runner.sh` inside a container, but we're only interested in the top-level stats. Update all tasks to include collection of the stats file. Unfortunately, due to the way the Cirrus-CI YAML parser works, it is *not* possible to alias the artifacts collection more clearly, for example: ```yaml always: <<: *runner_stats <<: *logs_artifacts ``` Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/logcollector.sh')
-rwxr-xr-xcontrib/cirrus/logcollector.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/contrib/cirrus/logcollector.sh b/contrib/cirrus/logcollector.sh
index 746bccec9..7bf651b36 100755
--- a/contrib/cirrus/logcollector.sh
+++ b/contrib/cirrus/logcollector.sh
@@ -76,5 +76,10 @@ case $1 in
# Any not-present packages will be listed as such
$PKG_LST_CMD "${PKG_NAMES[@]}" | sort -u
;;
+ time)
+ # Assumed to be empty/undefined outside of Cirrus-CI (.cirrus.yml)
+ # shellcheck disable=SC2154
+ if [[ -r "$STATS_LOGFILE" ]]; then cat "$STATS_LOGFILE"; fi
+ ;;
*) die "Warning, $(basename $0) doesn't know how to handle the parameter '$1'"
esac