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=`/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_adder.php -- public_html/common.php "select SEC_TO_TIME(SUM(TIME_TO_SEC(time))) from bench where mark = \"$MARK\" group by mark;"`
15 OLD_TIME=`/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_adder.php -- public_html/common.php "select mark, SEC_TO_TIME(SUM(TIME_TO_SEC(time))) from bench where mark = \"$LASTMARK\" group by mark;"`
17 if [ -z "$CUR_TIME" -o -z "$OLD_TIME" ]; then
18 echo "No benchamks records for $MARK"
22 ((DELTA=`/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_time2cents.php -- public_html/common.php $CUR_TIME` - `/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_time2cents.php -- public_html/common.php $OLD_TIME`))
23 if [ $DELTA -lt 0 ]; then
27 ((PERC=$PERC / `/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_time2cents.php -- public_html/common.php $OLD_TIME`))
29 if [ $PERC -ge 5 ]; then
32 http://mowgli.cs.unibo.it/~tassi/bench.php
34 PREFORMANCE LOSS DETECTED
41 CUR_FAIL=`/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_adder.php -- public_html/common.php "select count(distinct test) from bench where mark = \"$MARK\" and result = 'fail';"`
42 OLD_FAIL=`/usr/bin/php4 -c /etc/php4/apache/php.ini - shell_adder.php -- public_html/common.php "select count(distinct test) from bench where mark = \"$LASTMARK\" and result = 'fail';"`
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 = \"$LASTMARK\" and result = 'fail';" | mysql -u helm -h mowgli.cs.unibo.it matita`