1 <?php require("common.php");
5 // queries ::= query | query "###" queries
6 // query ::= name "@@@" sql
8 $limits = array("20","50","100");
10 $quey_all = urlencode("Whole content:@@@select * from bench order by mark desc***");
11 $query_fail = urlencode(
12 "Number of failures@@@" .
13 "select mark, count(distinct test) as fail_no from bench where result = 'fail' group by mark order by mark desc***"
16 "select distinct mark, test, result from bench where result = 'fail' order by mark desc***"
18 $query_gc = urlencode(
20 "select bench.mark, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time)) - SUM(TIME_TO_SEC(bench1.time))) as gc_hoverhead from bench, bench as bench1 where bench.mark = bench1.mark and bench.test = bench1.test and bench.options = 'gc-on' and bench1.options = 'gc-off' and bench.compilation = bench1.compilation group by mark***"
23 "select bench.mark, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time)) - SUM(TIME_TO_SEC(bench1.time))) as gc_hoverhead from bench, bench as bench1 where bench.mark = bench1.mark and bench.test = bench1.test and bench.options = 'gc-on' and bench1.options = 'gc-off' and bench.compilation = bench1.compilation and bench.compilation = 'opt' group by mark***"
25 "GC usage (byte)@@@" .
26 "select bench.mark, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time)) - SUM(TIME_TO_SEC(bench1.time))) as gc_hoverhead from bench, bench as bench1 where bench.mark = bench1.mark and bench.test = bench1.test and bench.options = 'gc-on' and bench1.options = 'gc-off' and bench.compilation = bench1.compilation and bench.compilation = 'byte' group by mark***"
29 $query_auto = urlencode(
30 "Auto (with GC)@@@select mark, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time))) as time from bench where test='auto.ma' and options = 'gc-on' group by mark order by mark desc***"
32 "Auto (without GC)@@@select mark, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time))) as time from bench where test='auto.ma' and options = 'gc-off' group by mark order by mark desc***"
34 # "GC overhead@@@select bench.mark, SEC_TO_TIME(SUM(TIME_TO_SEC(bench.time)) - SUM(TIME_TO_SEC(bench1.time))) as gc_hoverhead from bench, bench as bench1 where bench.mark = bench1.mark and bench.test = bench1.test and bench.options = 'gc-on' and bench1.options = 'gc-off' and bench.compilation = bench1.compilation and bench.test = 'auto.ma' group by mark"
37 $query_csc = urlencode("Performances (byte 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 = 'byte'group by mark order by mark desc"
40 $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"
43 $query_total = urlencode(
45 "Max N@@@select COUNT(DISTINCT test) as MAX from bench group by mark order by MAX desc LIMIT 0,1;"
47 "Number of compiled tests@@@select mark, COUNT(DISTINCT test) as N from bench group by mark order by mark desc***"
50 function minus1_to_all($s){
57 function links_of($name,$q,$limits){
58 echo "<li>$name : ";
59 if (strpos($q, urlencode("***")) === false) {
60 echo "<a href=\"showquery.php?query=$q;\">all</a>";
62 foreach($limits as $l) {
63 $q1 = str_replace(urlencode("***"), " LIMIT 0,$l", $q);
64 echo "<a href=\"showquery.php?query=$q1;\">" .
65 minus1_to_all($l) . "</a> ";
67 $q1 = str_replace(urlencode("***"), " LIMIT 0,-1", $q);
68 echo "<a href=\"showquery.php?query=$q1;\">" .
69 minus1_to_all("-1") . "</a> ";
78 <link type="text/css" rel="stylesheet" href="style.css"/>
81 <h1>QUERY the benchmark system</h1>
82 <h2>Common Queries</h2>
85 <? links_of("Broken tests",$query_fail,$limits) ?>
86 <? links_of("Garbage collector killer",$query_gc,$limits) ?>
87 <? links_of("Auto performances",$query_auto,$limits) ?>
88 <? links_of("Global performances (bytecode)",$query_csc,$limits) ?>
89 <? links_of("Global performances (nativecode)",$query_csc_opt,$limits) ?>
90 <? links_of("Number of compiled tests",$query_total,$limits) ?>
91 <? links_of("All table contents",$quey_all,$limits) ?>
95 <form action="composequery.php" method="get">
100 <? array_to_combo("mark",
101 query("select distinct mark from bench order by mark desc;")); ?>
105 <td>Compilations:</td>
107 <? array_to_combo("compilation",
108 query("select distinct compilation from bench;")); ?>
114 <?array_to_combo("options",query("select distinct options from bench;"));?>
120 <? array_to_combo("test",query("select distinct test from bench;")); ?>
124 <td>Test results:</td>
126 <? array_to_combo("result",query("select distinct result from bench;")); ?>
132 <? array_to_combo("groupby",array(array("mark","options"))); ?>
138 <? array_to_combo("limit",array($limits)); ?>
142 <td><input type="submit" value="Submit" class="button" /></td>