From 8902cce8cded7baa85dace76560af4adeb74fdd9 Mon Sep 17 00:00:00 2001
From: Holger Levsen
Date: Mon, 2 Mar 2015 22:26:44 +0100
Subject: reproducible: new page: stats (and split previous stats page into
suite_stats)
---
bin/reproducible_common.py | 5 +++--
bin/reproducible_common.sh | 19 ++++++++++-------
bin/reproducible_html_graphs.sh | 46 +++++++++++++++++++++++++++--------------
3 files changed, 45 insertions(+), 25 deletions(-)
diff --git a/bin/reproducible_common.py b/bin/reproducible_common.py
index c05f3d63..7c1574cf 100755
--- a/bin/reproducible_common.py
+++ b/bin/reproducible_common.py
@@ -161,9 +161,10 @@ html_head_page = Template((tab*2).join("""
packages tested in the last 48h
all tested packages (sorted alphabetically)
maintainers of unreproducible packages
- apt repository stats
package sets stats
- stats
+ \$suite stats
+ repositories overview
+ reproducible stats
""".splitlines(True)))
diff --git a/bin/reproducible_common.sh b/bin/reproducible_common.sh
index daefb044..4bba38d1 100755
--- a/bin/reproducible_common.sh
+++ b/bin/reproducible_common.sh
@@ -76,8 +76,8 @@ META_PKGSET[13]="maint_pkg-perl-maintainers"
init_html() {
MAINVIEW="stats"
ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted"
- ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list repo_stats pkg_sets stats"
- GLOBALVIEWS="issues notes no_notes repo_stats pkg_sets stats"
+ ALLVIEWS="issues notes no_notes scheduled last_24h last_48h all_abc dd-list pkg_sets suite_stats repo_stats stats"
+ GLOBALVIEWS="issues notes no_notes pkg_sets repo_stats stats"
SPOKENTARGET["issues"]="issues"
SPOKENTARGET["notes"]="packages with notes"
SPOKENTARGET["no_notes"]="packages without notes"
@@ -86,9 +86,10 @@ init_html() {
SPOKENTARGET["last_48h"]="packages tested in the last 48h"
SPOKENTARGET["all_abc"]="all tested packages (sorted alphabetically)"
SPOKENTARGET["dd-list"]="maintainers of unreproducible packages"
- SPOKENTARGET["repo_stats"]="apt repository stats"
SPOKENTARGET["pkg_sets"]="package sets stats"
- SPOKENTARGET["stats"]="$SUITE stats"
+ SPOKENTARGET["suite_stats"]="$SUITE stats"
+ SPOKENTARGET["repo_stats"]="repositories overview"
+ SPOKENTARGET["stats"]="reproducible stats"
# query some data we need everywhere
AMOUNT=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT count(*) FROM sources WHERE suite=\"${SUITE}\"")
COUNT_TOTAL=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT COUNT(*) FROM results AS r JOIN sources AS s ON r.package_id=s.id WHERE s.suite=\"${SUITE}\"")
@@ -166,10 +167,12 @@ write_page_header() {
continue
fi
write_page "${SPOKEN_TARGET}"
- done
- for i in $SUITES ; do
- if [ "$i" != "$SUITE" ] ; then
- write_page "suite: $i"
+ if [ "$TARGET" = "suite_stats" ] ; then
+ for i in $SUITES ; do
+ if [ "$i" != "$SUITE" ] ; then
+ write_page "suite: $i"
+ fi
+ done
fi
done
write_page ""
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index cd612d1f..52d342af 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -254,7 +254,7 @@ write_usertag_table() {
fi
}
-VIEW=stats
+VIEW=suite_stats
PAGE=index_${VIEW}.html
echo "$(date) - starting to write $PAGE page."
write_page_header $VIEW "Overview of various statistics about reproducible builds for $SUITE"
@@ -284,21 +284,11 @@ set_icon blacklisted
write_icon
write_page "$COUNT_BLACKLISTED blacklisted packages neither.
"
write_page ""
-# FIXME: we don't do 2 / stats_builds_age.png yet :/ (and 6 is special anyway)
-for i in 0 3 4 5 1 ; do
- if [ $i -ne 0 ] && [ "$SUITE" != "sid" ] ; then
- # do most stats only for sid
- continue
- fi
- if [ "$i" = "3" ] ; then
- write_usertag_table
- fi
- write_page " "
- # redo pngs once a day
- if [ ! -f /var/lib/jenkins/userContent/${TABLE[$i]}.png ] || [ -z $(find /var/lib/jenkins/userContent -maxdepth 1 -mtime +0 -name ${TABLE[$i]}.png) ] ; then
- redo_png $i ${TABLE[$i]}.png
+write_page " "
+# redo png once a day
+if [ ! -f /var/lib/jenkins/userContent/$SUITE/${TABLE[0]}.png ] || [ -z $(find /var/lib/jenkins/userContent/$SUITE -maxdepth 1 -mtime +0 -name ${TABLE[0]}.png) ] ; then
+ redo_png $i ${TABLE[0]}.png
fi
-done
write_page "
"
write_page_footer
publish_page $SUITE
@@ -371,3 +361,29 @@ done
write_page_footer
publish_page
+if [ "$SUITE" != "sid" ] ; then
+ # stop here if not called with no arguments...
+ exit 0
+fi
+VIEW=stats
+PAGE=index_${VIEW}.html
+echo "$(date) - starting to write $PAGE page."
+write_page_header $VIEW "Overview of various statistics about reproducible builds"
+write_page ""
+write_page "
"
+# FIXME: we don't do 2 / stats_builds_age.png yet :/ (and 6 and 0 are done already)
+for i in 3 4 5 1 ; do
+ if [ "$i" = "3" ] ; then
+ write_usertag_table
+ fi
+ write_page " "
+ # redo pngs once a day
+ if [ ! -f /var/lib/jenkins/userContent/${TABLE[$i]}.png ] || [ -z $(find /var/lib/jenkins/userContent -maxdepth 1 -mtime +0 -name ${TABLE[$i]}.png) ] ; then
+ redo_png $i ${TABLE[$i]}.png
+ fi
+done
+write_page "
"
+write_page_footer
+publish_page $SUITE
+
+
--
cgit v1.2.3-70-g09d2