From 4bbb754caca92b64bcacc0cf9ef363198f0eab4c Mon Sep 17 00:00:00 2001 From: Claudio Sacerdoti Coen Date: Wed, 18 Apr 2007 08:56:53 +0000 Subject: [PATCH] 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. --- .../matita/scripts/public_html/bench.php | 46 +++++++++++++++++-- 1 file changed, 43 insertions(+), 3 deletions(-) diff --git a/helm/software/matita/scripts/public_html/bench.php b/helm/software/matita/scripts/public_html/bench.php index 1ee4d9ae4..aabc1a501 100644 --- a/helm/software/matita/scripts/public_html/bench.php +++ b/helm/software/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){