5 YESTERDAY=`date -d yesterday +%Y%m%d`
6 TMPDIRNAME=$HOME/__${TODAY}_crontab
7 TMPDIRNAMEOLD=$HOME/__${YESTERDAY}_crontab
8 SVNROOT="svn+ssh://mowgli.cs.unibo.it/local/svn/helm/trunk/"
9 SHELLTIME2CENTSPHP=scripts/shell_time2cents.php
10 SHELLADDERPHP=scripts/shell_adder.php
11 COMMONPHP=scripts/public_html/common.php
12 MYSQL="mysql -u helm -h mowgli.cs.unibo.it matita"
13 SQLQMARK="select distinct mark from bench where mark like '"
14 SQLQORD="' order by mark;"
15 SQLQTIME="select SUM(timeuser) from bench where mark = \""
16 SQLQGRMARK="\" group by mark;"
17 SQLQFAIL="select count(distinct test) from bench where mark = \""
18 SQLQFAIL1="select distinct test from bench where mark = \""
19 SQLQFAIL2="\" and result = 'fail';"
20 URL="http://mowgli.cs.unibo.it/~tassi/bench.php"
28 svn co ${SVNROOT}helm/software/matita/scripts/ > LOG.svn 2>&1
31 scripts/profile_svn.sh 2> LOG
33 MARK=`echo $SQLQMARK$TODAY%$SQLQORD | $MYSQL | tail -n 1`
34 LASTMARK=`echo $SQLQMARK$YESTERDAY%$SQLQORD | $MYSQL | tail -n 1`
36 if [ -z "$MARK" ]; then
37 echo "No benchmark records for $TODAY"
41 if [ -z "$LASTMARK" ]; then
42 echo "No benchmark records for $YESTERDAY"
47 CUR_TIME=`echo $SQLQTIME$MARK$SQLQGRMARK | $MYSQL`
48 OLD_TIME=`echo $SQLQTIME$LASTMARK$SQLQGRMARK | $MYSQL`
50 ((DELTA=$CUR_CENTS-$OLD_CENTS))
51 if [ $DELTA -lt 0 ]; then
54 PREC=`scripts/functions.lua proportion $DELTA x $OLD_CENTS 100`
56 if [ $PERC -ge 5 ]; then
59 PERFORMANCE LOSS DETECTED (MARK $MARK vs MARK $LASTMARK)
61 Is `scripts/functions.lua t2s $CUR_TIME`
63 Was `scripts/functions.lua t2s $OLD_TIME`
69 #check for more broken tests
70 CUR_FAIL=`echo $SQLQFAIL$MARK$SQLQFAIL2 | $MYSQL`
71 OLD_FAIL=`echo $SQLQFAIL$LASTMARK$SQLQFAIL2 | $MYSQL`
73 if [ $CUR_FAIL -gt $OLD_FAIL ]; then
76 MORE BROKEN TESTS DETECTED (MARK $MARK vs MARK $LASTMARK)
79 `echo $SQLQFAIL1$MARK$SQLQFAIL2 | $MYSQL`
82 `echo $SQLQFAIL1$LASTMARK$SQLQFAIL2 | $MYSQL`