3 LASTMARK=`date -d yesterday +%Y%m%d`
4 TMPDIRNAME=.__${MARK}_crontab
5 CVSROOT=":ext:$USER@marcello.cs.unibo.it:/home/faculty/PROJECTS/cvs/helm"
11 #cvs -d $CVSROOT co helm/matita/scripts 1>/dev/null 2>/dev/null
12 #helm/matita/scripts/profile_cvs.sh 2> LOG
14 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 | awk '{print $2}'`
15 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 | awk '{print $2}'`
16 ((DELTA=$CUR_TIME - $OLD_TIME))
17 if [ $DELTA -lt 0 ]; then
21 ((PERC=$PERC / $OLD_TIME))
23 if [ $PERC -ge 5 ]; then
26 http://mowgli.cs.unibo.it/tassi/bench.php
28 PREFORMANCE LOSS DETECTED
35 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`
36 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`
38 if [ $CUR_FAIL -gt $OLD_FAIL ]; then
41 http://mowgli.cs.unibo.it/tassi/bench.php
43 MORE BROKEN TESTS DETECTED
45 `echo "select distinct test from bench where mark = \"$MARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`
47 `echo "select distinct test from bench where mark = \"$OLDMARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`