]> matita.cs.unibo.it Git - helm.git/blob - helm/matita/scripts/public_html/bench.php
d1a5fc53eeb3f7721878873a15d2b77cc8534f5e
[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' order 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 $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;"
40 );
41
42 $query_total = urlencode("Number of compiled tests@@@select mark, COUNT(DISTINCT test) as N from bench group by mark order by mark desc;"
43 #  . "###" .
44 #"Lost tests"
45 );
46
47 ?>
48
49 <html>
50   <head>
51   <link type="text/css" rel="stylesheet" href="style.css"/>
52   </head>
53   <body>
54     <h1>QUERY the benchmark system</h1>
55     <h2>Common Queries</h2>
56     <p>
57       <ul>
58       <li><a href="showquery.php?query=<? echo $query_fail; ?>">Broken tests</a></li>
59       <li><a href="showquery.php?query=<? echo $query_gc; ?>">Garbage collector killer</a></li>
60       <li><a href="showquery.php?query=<? echo $query_auto; ?>">Auto performances</a></li>
61       <li><a href="showquery.php?query=<? echo $query_csc; ?>">Global performances (bytecode)</a></li>
62       <li><a href="showquery.php?query=<? echo $query_csc_opt; ?>">Global performances (nativecode)</a></li>
63       <li><a href="showquery.php?query=<? echo $query_total; ?>">Number of compiled tests</a></li>
64       <li><a href="showquery.php?query=<? echo $quey_all; ?>">All table contents</a></li>
65       </ul>
66     </p>
67     <h2>Custom Query</h2>
68     <form action="composequery.php" method="get">
69     <table>
70   <tr>
71     <td>Marks:</td>
72     <td> 
73       <? array_to_combo("mark",
74             query("select distinct mark from bench order by mark desc;")); ?>
75     </td>
76   </tr>
77   <tr>
78     <td>Compilations:</td>
79     <td> 
80       <? array_to_combo("compilation",
81            query("select distinct compilation from bench;")); ?>
82     </td>
83   </tr>
84   <tr>
85     <td>Options:</td>
86     <td>  
87       <?array_to_combo("options",query("select distinct options from bench;"));?>
88     </td>
89   </tr>
90   <tr>
91     <td>Tests:</td>
92     <td>    
93       <? array_to_combo("test",query("select distinct test from bench;")); ?>
94     </td>
95   </tr>
96   <tr>
97     <td>Test results:</td>
98     <td>
99       <? array_to_combo("result",query("select distinct result from bench;")); ?>
100     </td>
101   </tr>
102   <tr>
103     <td>Group By: </td>
104     <td>
105       <? array_to_combo("groupby",array(array("mark","options"))); ?>
106     </td>
107   </tr>
108   <tr>
109     <td>Limit: </td>
110     <td>
111       <? array_to_combo("limit",array(array("30","50","-1"))); ?>
112     </td>
113   </tr>
114   <tr>
115     <td><input type="submit" value="Submit"/></td>
116   </tr>
117  </table>
118 </form>
119 </body>
120 </html>