From: Enrico Tassi Date: Mon, 27 Jun 2005 09:15:21 +0000 (+0000) Subject: more detailed but less verbose and annoying report X-Git-Tag: INDEXING_NO_PROOFS~59 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=974deb534307c34492b516999d09c409ff570bb8;p=helm.git more detailed but less verbose and annoying report --- diff --git a/helm/matita/scripts/crontab.sh b/helm/matita/scripts/crontab.sh index 03ce5ce95..926a9750c 100644 --- a/helm/matita/scripts/crontab.sh +++ b/helm/matita/scripts/crontab.sh @@ -1,4 +1,5 @@ MARK=`date +%Y%m%d` +LASTMARK=`date -d yesterday +%Y%m%d` TMPDIRNAME=.__${MARK}_crontab CVSROOT=":ext:$USER@marcello.cs.unibo.it:/home/faculty/PROJECTS/cvs/helm" @@ -6,24 +7,48 @@ OLD=$PWD rm -rf $TMPDIRNAME mkdir $TMPDIRNAME cd $TMPDIRNAME -cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null -helm/matita/scripts/profile_cvs.sh 2> LOG +#cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null +#helm/matita/scripts/profile_cvs.sh 2> LOG + +CUR_TIME=`echo "select mark, SUM(TIME_TO_SEC(time)) from bench where mark = \"$MARK\" group by mark;" | mysql -u helm -h mowgli.cs.unibo.it matita | tail -n 1 | cut -f 2` +OLD_TIME=`echo "select mark, SUM(TIME_TO_SEC(time)) from bench where mark = \"$LASTMARK\" group by mark;" | mysql -u helm -h mowgli.cs.unibo.it matita | tail -n 1 | cut -f 2` +((DELTA=$CUR_TIME - $OLD_TIME)) +if [ $DELTA -lt 0 ]; then + ((DELTA=$DELTA * -1)) +fi +((PERC=100 * $DELTA)) +((PERC=$PERC / $OLD_TIME)) + +if [ $PERC -ge 5 ]; then + cat <