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