[CSS Shapes] Add performance test for raster shape
[WebKit-https.git] / PerformanceTests / DoYouEvenBench / Full.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <title>DoYouEvenBench</title>
5 <script>
6
7 (function () {
8     var values = [];
9     var pre = null;
10     var iterationNumber = 0;
11     window.benchmarkClient = {
12         didRunSuites: function (measuredValues) {
13             if (!pre) {
14                 pre = document.createElement('pre');
15                 pre.style.paddingTop = '600px';
16                 document.body.appendChild(pre);
17             }
18             values.push(measuredValues.total);
19             iterationNumber++;
20             pre.appendChild(document.createTextNode('Iteration ' + iterationNumber + ': ' + measuredValues.total + ' ms\n'));
21         },
22         didFinishLastIteration: function () {
23             var sum = 0;
24             for (var i = 0; i < values.length; i++)
25                 sum += values[i];
26             pre.appendChild(document.createTextNode('Average: ' + (sum / iterationNumber)  + ' ms\n'));
27             pre.style.paddingTop = 0;
28         }
29     }
30 })();
31
32 function startTest() {
33     var iterationCount = 5;
34     var runner = new BenchmarkRunner(Suites, benchmarkClient);
35     runner.runMultipleIterations(iterationCount);
36 }
37
38 </script>
39 <script src="resources/benchmark-runner.js"></script>
40 <script src="resources/benchmark-report.js"></script>
41 <script src="resources/tests.js"></script>
42 </head>
43 <body onload="startTest()">
44 </body>
45 </html>