Unreviewed. Add some WebGPU examples.
[WebKit-https.git] / Websites / webkit.org / perf / slickspeed / system / index.php
1 <?php
2
3         $frameworks = parse_ini_file('config.ini', true);
4         $selectors = file_get_contents('selectors.list');
5
6 ?>
7 <!DOCTYPE html>
8
9 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
10 <head>
11         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
12         <title>SlickSpeed Selectors Test</title>
13         <link rel="stylesheet" href="style.css" type="text/css" media="screen">
14         
15         <script type="text/javascript">
16                 <?php
17                 $selectors = explode("\n", $selectors);
18                 foreach ($selectors as $i => $selector) $list[$i] = "'".$selector."'";
19                 $list = implode(',', $list);
20                 echo "window.selectors = [$list]";
21                 ?>
22         </script>
23         
24         <script src="system/slickspeed.js" type="text/javascript"></script>
25 </head>
26
27 <body>
28         
29 <div id="container">
30         
31         <div id="controls">
32                 <a class="stop" href="#">stop tests</a>
33                 <a class="start" href="#">start tests</a>
34         </div>
35         
36 <?php include('header.html'); ?>
37
38 <?php
39         foreach ($frameworks as $framework => $properties){
40                 $include = $properties['file'];
41                 $function = $properties['function'];
42                 $modifier = $properties['modifier'];
43                 $time = time();
44                 echo "<iframe name='$framework' src='system/template.php?include=$include&function=$function&modifier=$modifier&nocache=$time'></iframe>\n\n";
45         }
46 ?>
47
48 <table>
49
50         <thead id="thead">
51                 <tr>
52                         <th class="selectors-title">selectors</th>
53                         <?php
54                                 foreach ($frameworks as $framework => $properties){
55                                         echo "<th class='framework'>$framework</th>";
56                                 }
57                         ?>
58                 </tr>
59         </thead>
60
61         <tbody id="tbody">
62                 <?php
63                         foreach ($selectors as $selector){
64                                 echo "<tr>";
65                                 $selector = str_replace('%', '', $selector);
66                                 echo "<th class='selector'>$selector</th>";
67                                 foreach ($frameworks as $framework){
68                                         echo "<td class='empty'></td>";
69                                 }
70                                 echo "</tr>";
71                         }
72                 ?>
73         </tbody>
74         
75         <tfoot id="tfoot">
76                 <tr>
77                 <th class="score-title"><strong>final time (less is better)</strong></th>
78                 <?php
79                         foreach ($frameworks as $framework){
80                                 echo "<td class='score'>0</td>";
81                         }
82                 ?>
83                 </tr>
84         </tfoot>
85
86 </table>
87
88 <h2>Legend</h2>
89
90 <table id="legend">
91
92         <tr>
93                 <th>the faster</th>
94                 <th>the slower</th>
95                 <th>exception thrown or zero elements found</th>
96                 <th>different returned elements</th>
97         </tr>
98
99         <tr>
100                 <td class="good"></td>
101                 <td class="bad"></td>
102                 <td class="exception"></td>
103                 <td class="mismatch"></td>
104         </tr>
105
106 </table>
107
108 <?php include('footer.html'); ?>
109 </div>
110
111 </body>
112 </html>