+$query_csc = urlencode("Performances (byte and GC) per mark@@@select bench.mark ,bench_svn.revision as revision, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time))) as sum_time, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.timeuser))) as sum_timeuser from bench, bench_svn where bench.options = 'gc-on' and bench.compilation = 'byte' and bench_svn.mark = bench.mark group by bench.mark order by bench.mark desc"
+);
+
+$query_csc_opt = urlencode("Performances (opt and GC) per mark@@@select bench.mark,bench_svn.revision as revision, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time))) as sum_time, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.timeuser))) as sum_timeuser from bench, bench_svn where bench.options = 'gc-on' and bench.compilation = 'opt' and bench_svn.mark = bench.mark group by bench.mark order by bench.mark desc"
+);
+
+$query_total = urlencode(
+
+"Max N@@@select COUNT(DISTINCT test) as MAX from bench group by mark order by MAX desc LIMIT 0,1;"
+ . "###" .
+ "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;
+}
+
+function links_of($name,$q,$limits){
+ echo "<li>$name : ";
+ if (strpos($q, urlencode("***")) === false) {
+ echo "<a href=\"showquery.php?query=$q;\">all</a>";
+ } else {
+ foreach($limits as $l) {
+ $q1 = str_replace(urlencode("***"), " LIMIT 0,$l", $q);
+ echo "<a href=\"showquery.php?query=$q1;\">" .
+ minus1_to_all($l) . "</a> ";
+ }
+ $q1 = str_replace(urlencode("***"), " ", $q);
+ echo "<a href=\"showquery.php?query=$q1;\">" .
+ minus1_to_all("-1") . "</a> ";
+ }
+ echo "</li>";
+}