diff options
author | Holger Levsen <holger@layer-acht.org> | 2016-01-06 21:09:39 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2016-01-06 21:09:39 +0100 |
commit | 39bac6624a66fadbc2ad17862cf56fa19423db2c (patch) | |
tree | b1a22fc7cc90a3ee365136a8e3089dfa3f37cd0b | |
parent | 456c1433678e87fc60906fcc3091069a86f3eab8 (diff) | |
download | jenkins.debian.net-39bac6624a66fadbc2ad17862cf56fa19423db2c.tar.xz |
reproducible: include node performance stats in job output
-rwxr-xr-x | bin/reproducible_nodes_info.sh | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/bin/reproducible_nodes_info.sh b/bin/reproducible_nodes_info.sh index 4015b6e2..3e419a00 100755 --- a/bin/reproducible_nodes_info.sh +++ b/bin/reproducible_nodes_info.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright © 2015 Holger Levsen <holger@layer-acht.org> +# Copyright © 2015-2016 Holger Levsen <holger@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 |