Add SixSpeed benchmark to PerformanceTests
[WebKit.git] / PerformanceTests / DOM / get-elements-by-tag-name-traversal-uncached.html
1 <!DOCTYPE html>
2 <html>
3 <head>
4 <script src="../resources/runner.js"></script>
5 <script>
6 function runTest() {
7     PerfTestRunner.measureRunsPerSecond({
8         description: "This benchmark covers 'getElementsByTagName'.",
9         run: function() {
10             var testDocument = document.getElementById("testFrame").contentDocument;
11             for (var i = 0; i < 10; i++) {
12                 var elements = testDocument.getElementsByTagName("p");
13                 // Do not access length so that we do not cache the elements.
14                 var j = 0;
15                 while (elements.item(j++)) { }
16             }
17         }
18     });
19 }
20 </script>
21 </head>
22 <body onload="runTest()">
23 <iframe id="testFrame" src="../Parser/resources/html5.html" style="display:none" sandbox></iframe>
24 </body>
25 </html>