From d2ad346cbcac2330febfee7b96e6b64abdc719df Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sat, 24 Dec 2016 14:09:39 +0100 Subject: reproducible Debian: display weekly average for arm64 for now Signed-off-by: Holger Levsen --- bin/reproducible_html_dashboard.sh | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) (limited to 'bin') diff --git a/bin/reproducible_html_dashboard.sh b/bin/reproducible_html_dashboard.sh index 3a81a776..fe1a7e37 100755 --- a/bin/reproducible_html_dashboard.sh +++ b/bin/reproducible_html_dashboard.sh @@ -314,6 +314,7 @@ write_build_performance_stats() { SEC=$(echo "$RESULT-($MIN*60)"|bc) write_page "$MIN minutes, $SEC seconds" done + local TIMESPAN_VERBOSE="4 weeks" local TIMESPAN_RAW="28" # Find stats for 28 days since yesterday, no stats exist for today @@ -341,9 +342,19 @@ write_build_performance_stats() { done write_page "packages tested on average per day in the last $TIMESPAN_VERBOSE" for ARCH in ${ARCHS} ; do + if [ "$ARCH" = "arm64" ] ; then + TIMESPAN_RAW="7" + local ARM64_DISCLAIMER=" (daily average in the last week)" + else + TIMESPAN_RAW="28" + local ARM64_DISCLAIMER="" + fi + local TIMESPAN="$(echo $TIMESPAN_RAW-1|bc)" + local TIMESPAN_DATE=$(date '+%Y-%m-%d %H:%M' -d "- $TIMESPAN days") + RESULT=$(query_db "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > '$TIMESPAN_DATE' AND r.architecture='$ARCH'") RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)" - write_page "$RESULT" + write_page "$RESULT$ARM64_DISCLAIMER" done local TIMESPAN_VERBOSE="3 months" local TIMESPAN_RAW="91" @@ -354,6 +365,9 @@ write_build_performance_stats() { for ARCH in ${ARCHS} ; do RESULT=$(query_db "SELECT COUNT(r.build_date) FROM stats_build AS r WHERE r.build_date > '$TIMESPAN_DATE' AND r.architecture='$ARCH'") RESULT="$(echo $RESULT/$TIMESPAN_RAW|bc)" + if [ "$ARCH" = "arm64" ] ; then + RESULT=" " + fi write_page "$RESULT" done write_page "" -- cgit v1.2.3-70-g09d2