]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/matita/scripts/public_html/bench.php
fix
[helm.git] / helm / matita / scripts / public_html / bench.php
index 0a09d40abe27be706fec73c03e67cb295462ddc7..144597b1a9213fb2de7f385d9dcf87ba0232d19a 100644 (file)
@@ -5,8 +5,8 @@
 // queries ::= query | query "###" queries
 // query ::= name "@@@" sql
 //
-$limits = array("30","50","-1");
-
+$limits = array("20","50","100","-1");
+  
 $quey_all = urlencode("Whole content:@@@select * from bench");
 $query_fail = urlencode(
   "Number of failures:@@@" .
@@ -40,19 +40,26 @@ $query_csc = urlencode("Performances (byte and GC) per mark@@@select mark, SEC_T
 $query_csc_opt = urlencode("Performances (opt and GC) per mark@@@select mark, SEC_TO_TIME(SUM(TIME_TO_SEC(time))) as sum_time, SEC_TO_TIME(SUM(TIME_TO_SEC(timeuser))) as sum_timeuser from bench where options = 'gc-on' and compilation = 'opt'group by mark order by mark desc"
 );
 
-$query_total = urlencode("Number of compiled tests@@@select mark, COUNT(DISTINCT test) as N from bench group by mark order by mark desc"
-#  . "###" .
-#"Lost tests"
+$query_total = urlencode(
+  
+"Max N@@@select COUNT(DISTINCT test) from bench group by mark"
+  . "###" .
+  "Number of compiled tests@@@select mark, COUNT(DISTINCT test) as N from bench group by mark order by mark desc"
 );
 
 function minus1_to_all($s){
-  if ($s = "-1") return "all" else return $s;
+  if ($s == "-1") 
+    return "all";
+  else 
+    return $s;
 }
 
-function links_of($name,$q){
-  echo "<li>$name";
+function links_of($name,$q,$limits){
+  echo "<li>$name&nbsp;";
   foreach($limits as $l) {
-    echo "<a href=\"showquery.php?query=$q LIMIT 0,$l; \">$l</a>&nbsp;";
+    $q1 = str_replace(urlencode("###"), " LIMIT 0,$l;" . urlencode("###"), $q);
+    echo "<a href=\"showquery.php?query=$q1 LIMIT 0,$l; \">" . 
+          minus1_to_all($l) . "</a>&nbsp;";
   }
   echo "</li>";
 }
@@ -68,13 +75,13 @@ function links_of($name,$q){
     <h2>Common Queries</h2>
     <p>
       <ul>
-      <? links_of("Broken tests",$query_fail) ?>
-      <? links_of("Garbage collector killer",$query_gc) ?>
-      <? links_of("Auto performances",$query_auto) ?>
-      <? links_of("Global performances (bytecode)",$query_csc) ?>
-      <? links_of("Global performances (nativecode)",$query_csc_opt) ?>
-      <? links_of("Number of compiled tests",$query_total) ?>
-      <? links_of("All table contents",$quey_all) ?>
+      <? links_of("Broken tests",$query_fail,$limits) ?>
+      <? links_of("Garbage collector killer",$query_gc,$limits) ?>
+      <? links_of("Auto performances",$query_auto,$limits) ?>
+      <? links_of("Global performances (bytecode)",$query_csc,$limits) ?>
+      <? links_of("Global performances (nativecode)",$query_csc_opt,$limits) ?>
+      <? links_of("Number of compiled tests",$query_total,$limits) ?>
+      <? links_of("All table contents",$quey_all,$limits) ?>
       </ul>
     </p>
     <h2>Custom Query</h2>