OLD | NEW |
(Empty) | |
| 1 <!DOCTYPE html> |
| 2 <html> |
| 3 <head> |
| 4 <!-- |
| 5 Copyright (C) 2007 Apple Inc. All rights reserved. |
| 6 |
| 7 Redistribution and use in source and binary forms, with or without |
| 8 modification, are permitted provided that the following conditions |
| 9 are met: |
| 10 1. Redistributions of source code must retain the above copyright |
| 11 notice, this list of conditions and the following disclaimer. |
| 12 2. Redistributions in binary form must reproduce the above copyright |
| 13 notice, this list of conditions and the following disclaimer in the |
| 14 documentation and/or other materials provided with the distribution. |
| 15 |
| 16 THIS SOFTWARE IS PROVIDED BY APPLE COMPUTER, INC. ``AS IS'' AND ANY |
| 17 EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 18 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 19 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
| 20 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 21 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 22 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 23 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 24 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 25 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 26 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 27 --> |
| 28 |
| 29 <title>SunSpider JavaScript Benchmark (In Progress...)</title> |
| 30 <link rel="stylesheet" href="sunspider.css"> |
| 31 </head> |
| 32 |
| 33 <body onload="next()"> |
| 34 |
| 35 <h2><span id="logo">☀</span>SunSpider JavaScript Benchmark <small>(In Pro
gress...)</small></h2> |
| 36 |
| 37 <script src="sunspider-test-prefix.js"></script> |
| 38 <script> |
| 39 var testIndex = -1; |
| 40 var currentRepeat = 0; |
| 41 var repeatCount = 5; |
| 42 |
| 43 var output = []; |
| 44 output.length = repeatCount; |
| 45 for (var i = 0; i < output.length; i++) { |
| 46 output[i] = {}; |
| 47 } |
| 48 |
| 49 function next() |
| 50 { |
| 51 window.setTimeout(reallyNext, 500); |
| 52 } |
| 53 |
| 54 function reallyNext() |
| 55 { |
| 56 testIndex++; |
| 57 if (testIndex < tests.length) { |
| 58 document.getElementById("testframe").src = tests[testIndex] + ".html"; |
| 59 } else if (++currentRepeat < repeatCount) { |
| 60 testIndex = 0; |
| 61 document.getElementById("testframe").src = tests[testIndex] + ".html"; |
| 62 } else { |
| 63 finish(); |
| 64 } |
| 65 } |
| 66 |
| 67 function recordResult(time) |
| 68 { |
| 69 output[currentRepeat][tests[testIndex]] = time; |
| 70 next(); |
| 71 } |
| 72 |
| 73 function finish() |
| 74 { |
| 75 var outputString = "{"; |
| 76 for (var test in output[0]) { |
| 77 outputString += '"' + test + '":['; |
| 78 for (var i = 0; i < output.length; i++) { |
| 79 outputString += output[i][test] + ","; |
| 80 } |
| 81 outputString = outputString.substring(0, outputString.length - 1); |
| 82 outputString += "],"; |
| 83 } |
| 84 outputString = outputString.substring(0, outputString.length - 1); |
| 85 outputString += "}"; |
| 86 |
| 87 location = "sunspider-results.html?" + encodeURI(outputString); |
| 88 } |
| 89 |
| 90 </script> |
| 91 |
| 92 <iframe id="testframe"> |
| 93 </iframe> |
| 94 |
| 95 </body> |
| 96 </html> |
OLD | NEW |