[Qa-jenkins-scm] [jenkins.debian.net] 01/01: reproducible: include node performance stats in job output

Holger Levsen holger at moszumanska.debian.org
Wed Jan 6 20:11:30 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 39bac6624a66fadbc2ad17862cf56fa19423db2c
Author: Holger Levsen <holger at layer-acht.org>
Date:   Wed Jan 6 21:09:39 2016 +0100

    reproducible: include node performance stats in job output
---
 bin/reproducible_nodes_info.sh | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh
index 4015b6e..3e419a0 100755
--- a/bin/reproducible_nodes_info.sh
+++ b/bin/reproducible_nodes_info.sh
@@ -1,6 +1,6 @@
 #!/bin/bash
 
-# Copyright © 2015 Holger Levsen <holger at layer-acht.org>
+# Copyright © 2015-2016 Holger Levsen <holger at layer-acht.org>
 # released under the GPLv=2
 
 DEBUG=false
@@ -15,6 +15,7 @@ mkdir -p $TARGET_DIR
 TMPFILE_SRC=$(mktemp)
 TMPFILE_NODE=$(mktemp)
 
+echo "$(date -u) - Collecting information from nodes"
 for NODE in $BUILD_NODES jenkins.debian.net ; do
 	if [ "$NODE" = "jenkins.debian.net" ] ; then
 		echo "$(date -u) - Trying to update $TARGET_DIR/$NODE."
@@ -42,4 +43,21 @@ for NODE in $BUILD_NODES jenkins.debian.net ; do
 	fi
 	rm -f $TMPFILE_SRC $TMPFILE_NODE
 done
+echo
+
+echo "$(date -u) - Showing nodes performances:"
+TMPFILE1=$(mktemp)
+TMPFILE2=$(mktemp)
+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
+done
+rm $TMPFILE1 >/dev/null
+sort -g -r $TMPFILE2
+rm $TMPFILE2 >/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