[Qa-jenkins-scm] [jenkins.debian.net] 01/02: reproducible debian: also show 24h node performance
Holger Levsen
holger at moszumanska.debian.org
Mon Feb 8 19:08:57 UTC 2016
This is an automated email from the git hooks/post-receive script.
holger pushed a commit to branch master
in repository jenkins.debian.net.
commit 043777c8c9ad12cdab22d726a4c6496a5057d087
Author: Holger Levsen <holger at layer-acht.org>
Date: Mon Feb 8 20:04:36 2016 +0100
reproducible debian: also show 24h node performance
---
bin/reproducible_nodes_info.sh | 18 ++++++++++++------
1 file changed, 12 insertions(+), 6 deletions(-)
diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh
index 1c6b1f9..132267c 100755
--- a/bin/reproducible_nodes_info.sh
+++ b/bin/reproducible_nodes_info.sh
@@ -48,16 +48,22 @@ echo
echo "$(date -u) - Showing node performance:"
TMPFILE1=$(mktemp)
TMPFILE2=$(mktemp)
+TMPFILE3=$(mktemp)
+NOW=$(date -u '+%Y-%m-%d %H:%m')
for i in $BUILD_NODES ; do
sqlite3 -init $INIT ${PACKAGES_DB} \
- "SELECT build_date FROM stats_build AS r WHERE r.node1=\"$i\" or r.node2=\"$i\"" > $TMPFILE1 2>/dev/null
- j=$(wc -l $TMPFILE1|cut -d " " -f1)
- k=$(cat $TMPFILE1|cut -d " " -f1|sort -u|wc -l)
- l=$(echo "scale=1 ; ($j/$k)" | bc)
- echo "$l builds/day ($j/$k) on $i" >> $TMPFILE2
+ "SELECT build_date FROM stats_build AS r WHERE ( r.node1=\"$i\" OR r.node2=\"$i\" )" > $TMPFILE1 2>/dev/null
+ j=$(wc -l $TMPFILE1|cut -d " " -f1)
+ k=$(cat $TMPFILE1|cut -d " " -f1|sort -u|wc -l)
+ l=$(echo "scale=1 ; ($j/$k)" | bc)
+ echo "$l builds/day ($j/$k) on $i" >> $TMPFILE2
+ m=$(sqlite3 -init $INIT ${PACKAGES_DB} "SELECT count(build_date) FROM stats_build AS r WHERE ( r.node1=\"$i\" OR r.node2=\"$i\" ) AND r.build_date > datetime('$NOW', '-24 hours') " 2>/dev/null)
+ echo "$m builds in the last 24h on $i" >> $TMPFILE3
done
rm $TMPFILE1 >/dev/null
sort -g -r $TMPFILE2
-rm $TMPFILE2 >/dev/null
+echo
+sort -g -r $TMPFILE3
+rm $TMPFILE2 $TMPFILE3 >/dev/null
echo
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git
More information about the Qa-jenkins-scm
mailing list