summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2016-02-04 01:24:53 +0100
committerHolger Levsen <holger@layer-acht.org>2016-02-04 01:24:53 +0100
commit6c299ad61a096880b2959389abcea2baa7bc67dc (patch)
tree86a3392844e8570026556241e04b4ba4ca2a6ab8
parent196e2d4ddb6441207bfbdedac527def09b6de609 (diff)
downloadjenkins.debian.net-6c299ad61a096880b2959389abcea2baa7bc67dc.tar.xz
reproducible debian: also show amount of packages build in the last 3 months
-rwxr-xr-xbin/reproducible_html_dashboard.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh
index 85dc7878..3a44f3da 100755
--- a/bin/reproducible_html_dashboard.sh
+++ b/bin/reproducible_html_dashboard.sh
@@ -321,15 +321,23 @@ write_build_performance_stats() {
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE r.build_date LIKE '%$DATE%' AND s.architecture='$ARCH'")
write_page "<td>$RESULT</td>"
done
+ write_page "</tr><tr><td>packages tested in the last 24h</td>"
+ for ARCH in ${ARCHS} ; do
+ RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$(date -u '+%Y-%m-%d')', '-24 hours') AND r.architecture='$ARCH'")
+ write_page "<td>$RESULT</td>"
+ done
write_page "</tr><tr><td>packages tested on average per day in the last $TIMESPAN_VERBOSE</td>"
for ARCH in ${ARCHS} ; do
RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$DATE', '-$TIMESPAN_RAW days') AND r.architecture='$ARCH'")
RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)"
write_page "<td>$RESULT</td>"
done
- write_page "</tr><tr><td>packages tested in the last 24h</td>"
+ local TIMESPAN_VERBOSE="3 months"
+ local TIMESPAN_RAW="91.5"
+ write_page "</tr><tr><td>packages tested on average per day in the last $TIMESPAN_VERBOSE</td>"
for ARCH in ${ARCHS} ; do
- RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$(date -u '+%Y-%m-%d')', '-24 hours') AND r.architecture='$ARCH'")
+ RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > datetime('$DATE', '-$TIMESPAN_RAW days') AND r.architecture='$ARCH'")
+ RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)"
write_page "<td>$RESULT</td>"
done
write_page "</tr></table>"