From 196e2d4ddb6441207bfbdedac527def09b6de609 Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 4 Feb 2016 01:17:26 +0100 Subject: reproducible debian: also show amount of packages build in the last 24h --- bin/reproducible_html_dashboard.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'bin/reproducible_html_dashboard.sh') diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh index c6dd2851..85dc7878 100755 --- a/bin/reproducible_html_dashboard.sh +++ b/bin/reproducible_html_dashboard.sh @@ -15,8 +15,8 @@ common_init "$@" # init some variables # # we only do stats up until yesterday... we also could do today too but not update the db yet... -DATE=$(date -d "1 day ago" '+%Y-%m-%d') -FORCE_DATE=$(date -d "3 days ago" '+%Y-%m-%d') +DATE=$(date -u -d "1 day ago" '+%Y-%m-%d') +FORCE_DATE=$(date -u -d "3 days ago" '+%Y-%m-%d') DUMMY_FILE=$(mktemp -t reproducible-dashboard-XXXXXXXX) touch -d "$(date '+%Y-%m-%d') 00:00 UTC" $DUMMY_FILE NOTES_GIT_PATH="/var/lib/jenkins/jobs/reproducible_html_notes/workspace" @@ -327,7 +327,12 @@ write_build_performance_stats() { RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)" write_page "$RESULT" done -write_page "" + write_page "packages tested in the last 24h" + 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 "$RESULT" + done + write_page "" } # -- cgit v1.2.3-70-g09d2