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}'`
17 if [ -z "$CUR_TIME" -o -z "$OLD_TIME" ]; then
18 echo "No benchamks records for $MARK"
22 ((DELTA=$CUR_TIME - $OLD_TIME))
23 if [ $DELTA -lt 0 ]; then
27 ((PERC=$PERC / $OLD_TIME))
29 if [ $PERC -ge 5 ]; then
32 http://mowgli.cs.unibo.it/tassi/bench.php
34 PREFORMANCE LOSS DETECTED
41 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`
42 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`
44 if [ $CUR_FAIL -gt $OLD_FAIL ]; then
47 http://mowgli.cs.unibo.it/tassi/bench.php
49 MORE BROKEN TESTS DETECTED
51 `echo "select distinct test from bench where mark = \"$MARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`
53 `echo "select distinct test from bench where mark = \"$OLDMARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`