From f164623e1e8b1ea8acc1b26dcff27a8826331d0e Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Sun, 28 Sep 2014 17:20:14 +0200 Subject: reproducible: make stats more interesting. --- bin/reproducible_stats.sh | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index 0050bb73..fc2fc366 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -24,9 +24,10 @@ COUNT_UGLY=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"404\" ORDER BY build_date DESC" | xargs echo) COUNT_SOURCELESS=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages WHERE status = \"404\"" | xargs echo) COUNT_TOTAL=$(sqlite3 $PACKAGES_DB "SELECT COUNT(name) FROM source_packages") -PERCENT_TOTAL=$(echo "scale=3 ; ($COUNT_TOTAL*100/$AMOUNT)" | bc) -PERCENT_GOOD=$(echo "scale=3 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc) -PERCENT_BAD=$(echo "scale=3 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc) +PERCENT_TOTAL=$(echo "scale=1 ; ($COUNT_TOTAL*100/$AMOUNT)" | bc) +PERCENT_GOOD=$(echo "scale=1 ; ($COUNT_GOOD*100/$COUNT_TOTAL)" | bc) +PERCENT_BAD=$(echo "scale=1 ; ($COUNT_BAD*100/$COUNT_TOTAL)" | bc) +GUESS_GOOD=$(echo "$PERCENT_GOOD*$AMOUNT/100" | bc) htmlecho() { echo "$1" >> index.html @@ -34,9 +35,9 @@ htmlecho() { rm index.html htmlecho "" > index.html -htmlecho "

Simple statistics for reproducible builds

" -htmlecho "

Results were obtaining by several jobs running on jenkins.debian.net.

" -htmlecho "

$COUNT_TOTAL packages attempted to build so far, out of $AMOUNT in $SUITE currently. That's $PERCENT_TOTAL%!

" +htmlecho "

Statistics for reproducible builds

" +htmlecho "

Results were obtaining by several jobs running on jenkins.debian.net. This page is updated after each job run.

" +htmlecho "

$COUNT_TOTAL packages attempted to build so far, out of $AMOUNT in Debian $SUITE currently. That's $PERCENT_TOTAL%!

" htmlecho "

$COUNT_BAD packages ($PERCENT_BAD% of $COUNT_TOTAL) failed to built reproducibly: " for PKG in $BAD ; do VERSION=$(sqlite3 $PACKAGES_DB "SELECT version FROM source_packages WHERE name = \"$PKG\"") @@ -47,9 +48,12 @@ done htmlecho "

" htmlecho htmlecho "

$COUNT_UGLY packages failed to build from source: ${UGLY}

" -htmlecho "

$COUNT_SOURCELESS packages which don't exist in sid and need investigation: $SOURCELESS

" +if [ $COUNT_SOURCELESS -gt 0 ] ; then + htmlecho "

$COUNT_SOURCELESS packages which don't exist in sid and need investigation: $SOURCELESS

" +fi htmlecho "

$COUNT_GOOD packages ($PERCENT_GOOD% of $COUNT_TOTAL) successfully built reproducibly: ${GOOD}

" -htmlecho "

Packages which fail to build reproducibly, sorted by Maintainers: and Uploaders: fields." +htmlecho "

\"$PERCENT_GOOD% of $AMOUNT\" and \"$PERCENT_TOTAL% of $AMOUNT\" means roughly+wildly guessed $GUESS_GOOD packages can be build reproducibly! Yay! :-)" +htmlecho "


Packages which failed to build reproducibly, sorted by Maintainers: and Uploaders: fields." htmlecho "

$(echo $BAD | dd-list -i) 

" htmlecho "

Static URL for this page. Last modified: $(date)" htmlecho "

" -- cgit v1.2.3-70-g09d2