Unreviewed. Add some WebGPU examples.
[WebKit-https.git] / Websites / webkit.org / perf / slickspeed / system / template.php
1 <!DOCTYPE html>
2
3 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" debug="true">
4 <head>
5         <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
6         
7         <script type="text/javascript" src="../frameworks/<?php echo $_GET['include']; ?>"></script>
8         
9         <script type="text/javascript">
10                 
11                 var modifier = <?php echo '"'.$_GET['modifier'].'"'; ?>;
12         
13                 function test(selector){
14                         try {
15                                 var start = new Date().getTime();
16                                 var elements = <?php echo $_GET['function']; ?>(selector);
17                                 var step = (new Date().getTime() - start);
18                                 if (step > 750) return {'time': step, 'found': elements.length};
19                                 for(var i = 0; i < 250; i++)
20                                 {
21                                 <?php echo $_GET['function']; ?>(selector);
22                                 }
23                                 var end = (new Date().getTime() - start);
24                                 return {'time': Math.round(end), 'found': elements.length};
25                         } catch(err){
26                                 if (elements == undefined) elements = {length: -1};
27                                 return ({'time': (new Date().getTime() - start), 'found': elements.length, 'error': err});
28                         }
29
30                 };
31         
32         </script>
33         
34 </head>
35
36 <body>
37         
38         <?php include('../template.html');?>
39
40 </body>
41 </html>