2 LASTMARK=`date -d yesterday +%Y%m%d`
3 TMPDIRNAME=.__${MARK}_crontab
4 CVSROOT=":ext:$USER@marcello.cs.unibo.it:/home/faculty/PROJECTS/cvs/helm"
10 #cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null
11 #helm/matita/scripts/profile_cvs.sh 2> LOG
13 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`
14 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`
15 ((DELTA=$CUR_TIME - $OLD_TIME))
16 if [ $DELTA -lt 0 ]; then
20 ((PERC=$PERC / $OLD_TIME))
22 if [ $PERC -ge 5 ]; then
25 http://mowgli.cs.unibo.it/tassi/bench.php
27 PREFORMANCE LOSS DETECTED
34 CUR_FAIL=`echo "select count(distinct test) from bench where mark = \"$MARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita | tail -n 1`
35 OLD_FAIL=`echo "select count(distinct test) from bench where mark = \"$LASTMARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita | tail -n 1`
37 if [ $CUR_FAIL -gt $OLD_FAIL ]; then
40 http://mowgli.cs.unibo.it/tassi/bench.php
42 MORE BROKEN TESTS DETECTED
44 `echo "select distinct test from bench where mark = \"$MARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`
46 `echo "select distinct test from bench where mark = \"$OLDMARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`