diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-01-09 17:08:50 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-01-09 17:08:50 +0100 |
commit | e8bfdbd3163dbb33b690d8a3392fe826748ce40d (patch) | |
tree | e447f949b447a23f313b62ceec78346eb8f6611e | |
parent | 0004bb3271d3d03817a0d561a0e6c813b7c84d9d (diff) | |
download | jenkins.debian.net-e8bfdbd3163dbb33b690d8a3392fe826748ce40d.tar.xz |
reproducible: give percentages for meta pkg sets states
-rwxr-xr-x | bin/reproducible_html_graphs.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh index 555b35b7..62098437 100755 --- a/bin/reproducible_html_graphs.sh +++ b/bin/reproducible_html_graphs.sh @@ -87,6 +87,11 @@ gather_meta_stats() { COUNT_META_BAD=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT count(status) from source_packages WHERE status = 'unreproducible' AND date(build_date)<='$DATE' AND $META_WHERE;") COUNT_META_UGLY=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT count(status) from source_packages WHERE status = 'FTBFS' AND date(build_date)<='$DATE' AND $META_WHERE;") COUNT_META_REST=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT count(status) from source_packages WHERE (status != 'FTBFS' AND status != 'unreproducible' AND status != 'reproducible') AND date(build_date)<='$DATE' AND $META_WHERE;") + let META_ALL=COUNT_META_GOOD+COUNT_META_BAD+COUNT_META_UGLY+COUNT_META_REST + PERCENT_META_GOOD=$(echo "scale=1 ; ($COUNT_META_GOOD*100/$META_ALL)" | bc) + PERCENT_META_BAD=$(echo "scale=1 ; ($COUNT_META_BAD*100/$META_ALL)" | bc) + PERCENT_META_UGLY=$(echo "scale=1 ; ($COUNT_META_UGLY*100/$META_ALL)" | bc) + PERCENT_META_REST=$(echo "scale=1 ; ($COUNT_META_REST*100/$META_ALL)" | bc) META_GOOD=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT name from source_packages WHERE status = 'reproducible' AND date(build_date)<='$DATE' AND $META_WHERE;") META_BAD=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT name from source_packages WHERE status = 'unreproducible' AND date(build_date)<='$DATE' AND $META_WHERE;") META_UGLY=$(sqlite3 -init ${INIT} ${PACKAGES_DB} "SELECT name from source_packages WHERE status = 'FTBFS' AND date(build_date)<='$DATE' AND $META_WHERE;") @@ -275,20 +280,20 @@ for i in $(seq 1 ${#META_PKGSET[@]}) ; do write_page "<br />The package set '${META_PKGSET[$i]}' consists of: <br />" set_icon reproducible write_icon - write_page "$COUNT_META_GOOD packages successfully built reproducibly:" + write_page "$COUNT_META_GOOD packages ($PERCENT_META_GOOD%) successfully built reproducibly:" force_package_targets $META_GOOD link_packages $META_GOOD write_page "<br />" set_icon unreproducible with write_icon - write_page "$COUNT_META_BAD packages failed to built reproducibly:" + write_page "$COUNT_META_BAD ($PERCENT_META_BAD%) packages failed to built reproducibly:" force_package_targets $META_BAD link_packages $META_BAD write_page "<br />" if [ $COUNT_META_UGLY -gt 0 ] ; then set_icon FTBFS write_icon - write_page "$COUNT_META_UGLY packages failed to build from source:" + write_page "$COUNT_META_UGLY ($PERCENT_META_UGLY%) packages failed to build from source:" force_package_targets $META_UGLY link_packages $META_UGLY write_page "<br />" @@ -300,7 +305,7 @@ for i in $(seq 1 ${#META_PKGSET[@]}) ; do write_icon set_icon 404 write_icon - write_page "$COUNT_META_REST packages are either blacklisted, not for us or cannot be downloaded:" + write_page "$COUNT_META_REST ($PERCENT_META_REST%) packages are either blacklisted, not for us or cannot be downloaded:" force_package_targets $META_REST link_packages $META_REST write_page "<br />" |