1 <?php require("common.php");
5 // queries ::= query | query "###" queries
6 // query ::= name "@@@" sql
11 $quey_all = urlencode("Whole content:@@@select * from bench LIMIT 0,$query_limit;");
12 $query_fail = urlencode(
13 "Number of failures:@@@" .
14 "select mark, count(distinct test) as fail_no from bench where result = 'fail' group by mark order by mark desc LIMIT 0,$query_limit;"
17 "select distinct mark, test, result from bench where result = 'fail' order by mark desc LIMIT 0,$query_limit;"
19 $query_gc = urlencode(
21 "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 LIMIT 0,$query_limit;"
24 "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 LIMIT 0,$query_limit;"
26 "GC usage (byte)@@@" .
27 "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 LIMIT 0,$query_limit;"
30 $query_auto = urlencode(
31 "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 LIMIT 0,$query_limit;"
33 "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 LIMIT 0,$query_limit;"
35 # "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 LIMIT 0,$query_limit;"
38 $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 LIMIT 0,$query_limit;"
41 $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 LIMIT 0,$query_limit;"
44 $query_total = urlencode("Number of compiled tests@@@select mark, COUNT(DISTINCT test) as N from bench group by mark order by mark desc LIMIT 0,$query_limit;"
53 <link type="text/css" rel="stylesheet" href="style.css"/>
56 <h1>QUERY the benchmark system</h1>
57 <h2>Common Queries</h2>
60 <li><a href="showquery.php?query=<? echo $query_fail; ?>">Broken tests</a></li>
61 <li><a href="showquery.php?query=<? echo $query_gc; ?>">Garbage collector killer</a></li>
62 <li><a href="showquery.php?query=<? echo $query_auto; ?>">Auto performances</a></li>
63 <li><a href="showquery.php?query=<? echo $query_csc; ?>">Global performances (bytecode)</a></li>
64 <li><a href="showquery.php?query=<? echo $query_csc_opt; ?>">Global performances (nativecode)</a></li>
65 <li><a href="showquery.php?query=<? echo $query_total; ?>">Number of compiled tests</a></li>
66 <li><a href="showquery.php?query=<? echo $quey_all; ?>">All table contents</a></li>
70 <form action="composequery.php" method="get">
72 <tr><td>Marks:</td><td>
73 <? array_to_combo("mark",query("select distinct mark from bench order by mark desc;")); ?></td></tr>
74 <tr><td>Compilations:</td><td>
75 <? array_to_combo("compilation",query("select distinct compilation from bench;")); ?></td></tr>
76 <tr><td>Options:</td><td>
77 <? array_to_combo("options",query("select distinct options from bench;")); ?></td></tr>
78 <tr><td>Tests:</td><td>
79 <? array_to_combo("test",query("select distinct test from bench;")); ?></td></tr>
80 <tr><td>Test results:</td><td>
81 <? array_to_combo("result",query("select distinct result from bench;")); ?></td></tr>
82 <tr><td>Group By: </td><td>
83 <? array_to_combo("groupby",array(array("mark","options"))); ?></td></tr>
84 <tr><td><input type="submit" value="Submit"/></td></tr>