From bd6e297aa883d387f58a61ed7da0ea8f4be69dec Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 23 May 2015 19:48:36 +0200 Subject: reproducible: more stats --- bin/reproducible_html_graphs.sh | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'bin') diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index 7f59c18b..ecb0ba32 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -567,10 +567,19 @@ create_main_stats_page() { AGE_UNSTABLE=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='unstable' AND datum='$DATE'") AGE_EXPERIMENTAL=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='experimental' AND datum='$DATE'") write_page "oldest build result in testing / unstable / experimental$AGE_TESTING / $AGE_UNSTABLE / $AGE_EXPERIMENTAL days" - RESULT=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r WHERE r.build_duration!='' AND r.build_duration!='0'") + RESULT=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r WHERE r.build_duration!='' AND r.build_duration!='0' AND r.build_date LIKE '%$DATE%'") MIN=$(echo $RESULT/60|bc) SEC=$(echo "$RESULT-($MIN*60)"|bc) - write_page "average test duration$MIN minutes, $SEC seconds" + write_page "average test duration (on $DATE)$MIN minutes, $SEC seconds" + RESULT=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT CAST(AVG(r.build_duration) AS INTEGER) FROM results AS r WHERE r.build_duration!='' AND r.build_duration!='0' AND r.build_date > datetime('$DATE', '-28 days')") + MIN=$(echo $RESULT/60|bc) + SEC=$(echo "$RESULT-($MIN*60)"|bc) + write_page "average test duration (in the last 4 weeks)$MIN minutes, $SEC seconds" + RESULT=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r WHERE r.build_date LIKE '%$DATE%'") + write_page "packages tested on $DATE$RESULT" + RESULT=$(sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r WHERE r.build_date > datetime('$DATE', '-28 days')") + RESULT="$(echo $RESULT/28|bc)" + write_page "packages tested on average per day in the last 4 weeks$RESULT" write_page "" # write bugs with usertags table write_usertag_table -- cgit v1.2.3-54-g00ecf