From: Claudio Sacerdoti Coen Date: Wed, 18 Apr 2007 08:56:53 +0000 (+0000) Subject: Added new query to time-diff the last mark with the previous one. X-Git-Tag: 0.4.95@7852~522 X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=commitdiff_plain;h=d4a1c820a3a4c33db1ae8a8625b6cf6184270d97;p=helm.git Added new query to time-diff the last mark with the previous one. The query is also the example query below in case you want to change the two marks. --- diff --git a/matita/scripts/public_html/bench.php b/matita/scripts/public_html/bench.php index 1ee4d9ae4..aabc1a501 100644 --- a/matita/scripts/public_html/bench.php +++ b/matita/scripts/public_html/bench.php @@ -6,12 +6,48 @@ // query ::= name "@@@" sql // $limits = array("20","50","100"); + +$query_last_mark = "select mark from bench order by mark desc limit 1;"; +$last_mark = ""; +function set_last_mark($a) { + global $last_mark; + foreach ($a as $k => $v) { + $last_mark = $v; + } +} +query($query_last_mark,"set_last_mark"); + +$query_before_last_mark = "select mark from bench where mark <> '$last_mark' order by mark desc limit 1;"; +$before_last_mark = ""; +function set_before_last_mark($a) { + global $before_last_mark; + foreach ($a as $k => $v) { + $before_last_mark = $v; + } +} +query($query_before_last_mark,"set_before_last_mark"); $quey_all = urlencode(" Whole content: @@@ select * from bench order by mark desc***"); +$query_diff = urlencode(" +Time diff: +@@@ +select + b1.test as test, b1.timeuser as oldtime, b2.timeuser as newtime, b1.compilation as comp, b1.options as opts, + (b2.timeuser - b1.timeuser) as diff +from + bench as b1, bench as b2 +where + b1.test = b2.test and + b1.options = b2.options and + b1.compilation = b2.compilation and + b1.mark = '$before_last_mark' and b2.mark= '$last_mark' and + ABS(b2.timeuser - b1.timeuser) > 100 +order by diff desc***"); + $query_fail = urlencode(" Number of failures @@@ @@ -218,6 +254,7 @@ function links_of($name,$q,$limits){