From 92fb05f5a325ae4b1d86549bb960553d079736ec Mon Sep 17 00:00:00 2001
From: Holger Levsen
"
+}
+
#
# create suite stats page
#
@@ -395,26 +420,7 @@ create_main_stats_page() {
for SUITE in $SUITES ; do
write_page " "
done
- # write build performace stats
- write_page " "
+ AGE_TESTING=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='testing' AND architecture='$ARCH' AND datum='$DATE'")
+ AGE_UNSTABLE=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='unstable' AND architecture='$ARCH' AND datum='$DATE'")
+ AGE_EXPERIMENTAL=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='experimental' AND architecture='$ARCH' AND datum='$DATE'")
+ write_page "Build statistics for $ARCH "
+ RESULT=$(sqlite3 -init ${INIT} ${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 "oldest $ARCH build result in testing / unstable / experimental $AGE_TESTING / $AGE_UNSTABLE / $AGE_EXPERIMENTAL days "
+ RESULT=$(sqlite3 -init ${INIT} ${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 (on $DATE) $MIN minutes, $SEC seconds "
+ RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r WHERE r.build_date LIKE '%$DATE%'")
+ write_page "average test duration (in the last 4 weeks) $MIN minutes, $SEC seconds "
+ RESULT=$(sqlite3 -init ${INIT} ${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 $DATE $RESULT "
+ write_page "packages tested on average per day in the last 4 weeks $RESULT
"
+ write_build_performace_stats
# link to index_breakages
write_page " "
- AGE_TESTING=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='testing' AND architecture='$ARCH' AND datum='$DATE'")
- AGE_UNSTABLE=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='unstable' AND architecture='$ARCH' AND datum='$DATE'")
- AGE_EXPERIMENTAL=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT CAST(max(oldest_reproducible, oldest_unreproducible, oldest_FTBFS) AS INTEGER) FROM ${TABLE[2]} WHERE suite='experimental' AND architecture='$ARCH' AND datum='$DATE'")
- write_page "Build statistics "
- RESULT=$(sqlite3 -init ${INIT} ${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 "oldest $ARCH build result in testing / unstable / experimental $AGE_TESTING / $AGE_UNSTABLE / $AGE_EXPERIMENTAL days "
- RESULT=$(sqlite3 -init ${INIT} ${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 (on $DATE) $MIN minutes, $SEC seconds "
- RESULT=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT COUNT(r.build_date) FROM results AS r WHERE r.build_date LIKE '%$DATE%'")
- write_page "average test duration (in the last 4 weeks) $MIN minutes, $SEC seconds "
- RESULT=$(sqlite3 -init ${INIT} ${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 $DATE $RESULT "
- write_page "packages tested on average per day in the last 4 weeks $RESULT
"
write_page "
There are some problems in this setup too. And there is documentation too, in case you missed the link at the top. More feedback is always welcome!