OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <html> | 2 <html> |
3 <head> | 3 <head> |
4 | 4 |
5 <meta charset=utf8> | 5 <meta charset=utf8> |
6 | 6 |
7 <!-- | 7 <!-- |
8 Copyright (C) 2007 Apple Inc. All rights reserved. | 8 Copyright (C) 2007 Apple Inc. All rights reserved. |
9 | 9 |
10 Redistribution and use in source and binary forms, with or without | 10 Redistribution and use in source and binary forms, with or without |
(...skipping 11 matching lines...) Expand all Loading... |
22 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR | 22 PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE COMPUTER, INC. OR |
23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 23 CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 24 EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 25 PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 26 PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 27 OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 28 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 29 OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
30 --> | 30 --> |
31 | 31 |
32 <title>SunSpider 0.9.1 JavaScript Benchmark (sunspider-0.9.1 test suite - In Pro
gress...)</title> | 32 <title>SunSpider 1.0 JavaScript Benchmark (sunspider-1.0 test suite - In Progres
s...)</title> |
33 <link rel="stylesheet" href="sunspider.css"> | 33 <link rel="stylesheet" href="../sunspider.css"> |
34 </head> | 34 </head> |
35 | 35 |
36 <body onload="start()"> | 36 <body onload="start()"> |
37 | 37 |
38 <h2><span id="logo">☀</span>SunSpider JavaScript Benchmark <small>(In Pro
gress...)</small></h2> | 38 <h2><span id="logo">☀</span>SunSpider JavaScript Benchmark <small>(In Pro
gress...)</small></h2> |
39 <h3>Content Version: sunspider-0.9.1</h3> | 39 <h3>Content Version: sunspider-1.0</h3> |
40 | 40 |
41 <script src="sunspider-test-prefix.js"></script> | 41 <script src="sunspider-test-prefix.js"></script> |
42 <script src="sunspider-test-contents.js"></script> | 42 <script src="sunspider-test-contents.js"></script> |
43 <script> | 43 <script> |
44 var testIndex = -1; | 44 var testIndex = -1; |
45 var currentRepeat = -1; | 45 var currentRepeat = -1; |
46 var repeatCount = 10; | 46 var repeatCount = 10; |
47 | 47 |
48 var output = []; | 48 var output = []; |
49 output.length = repeatCount; | 49 output.length = repeatCount; |
50 for (var i = 0; i < output.length; i++) { | 50 for (var i = 0; i < output.length; i++) { |
51 output[i] = {}; | 51 output[i] = {}; |
52 } | 52 } |
53 | 53 |
54 function start() | 54 function start() |
55 { | 55 { |
56 window.setTimeout(reallyNext, 500); | 56 window.setTimeout(reallyNext, 500); |
57 } | 57 } |
58 | 58 |
59 function next() | 59 function next() |
60 { | 60 { |
61 window.setTimeout(reallyNext, 10); | 61 window.setTimeout(reallyNext, 0); |
62 } | 62 } |
63 | 63 |
64 function reallyNext() | 64 function reallyNext() |
65 { | 65 { |
66 document.getElementById("frameparent").innerHTML = ""; | 66 document.getElementById("frameparent").innerHTML = ""; |
67 document.getElementById("frameparent").innerHTML = "<iframe id='testframe'>"
; | 67 document.getElementById("frameparent").innerHTML = "<iframe id='testframe'>"
; |
68 var testFrame = document.getElementById("testframe"); | 68 var testFrame = document.getElementById("testframe"); |
69 testIndex++; | 69 testIndex++; |
70 if (testIndex < tests.length) { | 70 if (testIndex < tests.length) { |
71 testFrame.contentDocument.open(); | 71 testFrame.contentDocument.open(); |
72 testFrame.contentDocument.write(testContents[testIndex]); | 72 testFrame.contentDocument.write(testContents[testIndex]); |
73 testFrame.contentDocument.close; | 73 testFrame.contentDocument.close(); |
74 } else if (++currentRepeat < repeatCount) { | 74 } else if (++currentRepeat < repeatCount) { |
75 testIndex = 0; | 75 testIndex = 0; |
76 testFrame.contentDocument.open(); | 76 testFrame.contentDocument.open(); |
77 testFrame.contentDocument.write(testContents[testIndex]); | 77 testFrame.contentDocument.write(testContents[testIndex]); |
78 testFrame.contentDocument.close; | 78 testFrame.contentDocument.close(); |
79 } else { | 79 } else { |
80 finish(); | 80 finish(); |
81 } | 81 } |
82 } | 82 } |
83 | 83 |
84 function recordResult(time) | 84 function recordResult(time) |
85 { | 85 { |
86 if (currentRepeat >= 0) // negative repeats are warmups | 86 if (currentRepeat >= 0) // negative repeats are warmups |
87 output[currentRepeat][tests[testIndex]] = time; | 87 output[currentRepeat][tests[testIndex]] = time; |
88 next(); | 88 next(); |
89 } | 89 } |
90 | 90 |
91 function finish() | 91 function finish() |
92 { | 92 { |
93 var outputString = "{"; | 93 var outputString = "{"; |
94 // outputString += '"v": "sunspider-0.9.1", '; | 94 outputString += '"v": "sunspider-1.0", '; |
95 for (var test in output[0]) { | 95 for (var test in output[0]) { |
96 outputString += '"' + test + '":['; | 96 outputString += '"' + test + '":['; |
97 for (var i = 0; i < output.length; i++) { | 97 for (var i = 0; i < output.length; i++) { |
98 outputString += output[i][test] + ","; | 98 var time = output[i][test]; |
| 99 if (time != time) |
| 100 time = "\"NaN\""; |
| 101 outputString += time + ","; |
99 } | 102 } |
100 outputString = outputString.substring(0, outputString.length - 1); | 103 outputString = outputString.substring(0, outputString.length - 1); |
101 outputString += "],"; | 104 outputString += "],"; |
102 } | 105 } |
103 outputString = outputString.substring(0, outputString.length - 1); | 106 outputString = outputString.substring(0, outputString.length - 1); |
104 outputString += "}"; | 107 outputString += "}"; |
105 | 108 |
106 location = "sunspider-results.html?" + encodeURI(outputString); | 109 location = "results.html?" + encodeURI(outputString); |
107 } | 110 } |
108 | 111 |
109 </script> | 112 </script> |
110 | 113 |
111 <div id="frameparent"> | 114 <div id="frameparent"> |
112 </div> | 115 </div> |
113 | 116 |
114 </body> | 117 </body> |
115 </html> | 118 </html> |
OLD | NEW |