summaryrefslogtreecommitdiff
path: root/bin/build-master-status
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-06 09:21:44 +0200
committerErich Eckner <git@eckner.net>2017-06-06 10:51:58 +0200
commit68e1821446ecbd08b1c5b92a52d301040e1cd2a9 (patch)
tree89f5eafff4cd7b539578ec89848a383ed0b19702 /bin/build-master-status
parent80553a5f66ec89335cac617df1c34df8c07db7ee (diff)
downloadbuilder-68e1821446ecbd08b1c5b92a52d301040e1cd2a9.tar.xz
bin/build-master-status: add statistics about loops
Diffstat (limited to 'bin/build-master-status')
-rwxr-xr-xbin/build-master-status15
1 files changed, 15 insertions, 0 deletions
diff --git a/bin/build-master-status b/bin/build-master-status
index 61eef0d..4648c6c 100755
--- a/bin/build-master-status
+++ b/bin/build-master-status
@@ -20,11 +20,26 @@ broken="$(
ls "${work_dir}/package-states/" | \
grep -c '\.broken$'
)"
+loops="$(
+ ls "${work_dir}/build-list.loops" | \
+ grep -c '^loop_[0-9]\+$'
+ )"
+looped_packages="$(
+ ls "${work_dir}/build-list.loops" | \
+ grep '^loop_[0-9]\+$' | \
+ sed "s|^|${work_dir}/build-list.loops/|" | \
+ xargs -r cat | \
+ sort -u | \
+ wc -l
+ )"
printf 'The mirror master contains %d stable packages (vs. ca. %d planned).\n' "${stable}" "$[${staging}+${tasks}]"
printf 'The build list contains %d tasks (incl. broken: %d).\n' "$[${tasks}-${broken}]" "${tasks}"
printf 'There are %d testing/staging packages.\n' "${staging}"
printf 'There are %d broken packages.\n' "${broken}"
+if [ "${loops}" -ne 0 ]; then
+ printf 'There are %d loops containing %d packages.\n' "${loops}" "${looped_packages}"
+fi
if [ $[${broken}+${staging}] -ne 0 ]; then
printf '%.1f%% of all packages are broken.\n' "$(bc <<< "scale=10; 100*${broken}/(${broken}+${staging})")"
fi