]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/public_html/bench.php
fix
[helm.git] / helm / matita / scripts / public_html / bench.php
1 <?php require("common.php"); 
2   
3 // syntax
4 //
5 // queries ::= query | query "###" queries
6 // query ::= name "@@@" sql
7 //
8   
9 $quey_all = urlencode("Whole content:@@@select * from bench;");
10 $query_fail = urlencode(
11   "Number of failures:@@@" .
12   "select mark, count(distinct test) as fail_no from bench where result = 'fail' group by mark order by mark desc;"
13   . "###" . 
14   "Tests failed:@@@" .
15   "select distinct mark, test, result from bench where result = 'fail' sort by mark desc;" 
16 );
17 $query_gc = urlencode(
18   "GC usage @@@" .
19   "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;"
20   . "###" . 
21   "GC usage (opt)@@@" .
22   "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;"
23   . "###" . 
24   "GC usage (byte)@@@" .
25   "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;"
26   
27 );
28 $query_auto = urlencode(
29   "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;"
30   . "###" . 
31   "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;"
32   #  . "###" . 
33   # "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;"
34 );
35
36 $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;");
37
38 ?>
39
40 <html>
41   <head>
42   <link type="text/css" rel="stylesheet" href="style.css"/>
43   </head>
44   <body>
45     <h1>QUERY the benchmark system</h1>
46     <h2>Common Queries</h2>
47     <p>
48       <ul>
49       <li><a href="showquery.php?query=<? echo $query_fail; ?>">Broken tests</a></li>
50       <li><a href="showquery.php?query=<? echo $query_gc; ?>">Garbage collector killer</a></li>
51       <li><a href="showquery.php?query=<? echo $query_auto; ?>">Auto performances</a></li>
52       <li><a href="showquery.php?query=<? echo $query_csc; ?>">Global performances</a></li>
53       <li><a href="showquery.php?query=<? echo $quey_all; ?>">All table contents</a></li>
54       </ul>
55     </p>
56     <h2>Custom Query</h2>
57     <form action="composequery.php" method="get">
58     <table>
59   <tr><td>Marks:</td><td> 
60     <? array_to_combo("mark",query("select distinct mark from bench order by mark desc;")); ?></td></tr>
61   <tr><td>Compilations:</td><td> 
62     <? array_to_combo("compilation",query("select distinct compilation from bench;")); ?></td></tr>
63   <tr><td>Options:</td><td>  
64     <? array_to_combo("options",query("select distinct options from bench;")); ?></td></tr>
65   <tr><td>Tests:</td><td>    
66     <? array_to_combo("test",query("select distinct test from bench;")); ?></td></tr>
67   <tr><td>Test results:</td><td>
68     <? array_to_combo("result",query("select distinct result from bench;")); ?></td></tr>
69   <tr><td>Group By: </td><td>
70     <? array_to_combo("groupby",array(array("mark","options"))); ?></td></tr>
71     <tr><td><input type="submit" value="Submit"/></td></tr>
72     </table>
73     </form>
74   </body>
75 </html>