Keun young Park | 33b3414 | 2012-10-30 17:51:52 -0700 | [diff] [blame] | 1 | <!DOCTYPE html> |
| 2 | <!-- Copyright 2012 the Octane project authors. Scroll to the end for full license --> |
| 3 | <html lang="en"> |
| 4 | <head> |
| 5 | <meta http-equiv="X-UA-Compatible" value="IE=edge"/> |
| 6 | <meta charset="utf-8"/> |
| 7 | <title>Octane JavaScript Benchmark</title> |
| 8 | <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| 9 | <meta http-equiv="Content-Script-Type" content="text/javascript"> |
| 10 | <meta name="description" |
| 11 | content="Octane JavaScript Benchmark - the Javascript benchmark for the modern web"> |
| 12 | <meta name="author" content="Octane Team Google"> |
| 13 | <!-- twitter bootstrap code --> |
| 14 | <script src="js/jquery.js"></script> |
| 15 | <script src="js/bootstrap-transition.js"></script> |
| 16 | <script src="js/bootstrap-collapse.js"></script> |
| 17 | <!-- Octane benchmark code --> |
| 18 | <script type="text/javascript" src="base.js"></script> |
| 19 | <script type="text/javascript" src="richards.js"></script> |
| 20 | <script type="text/javascript" src="deltablue.js"></script> |
| 21 | <script type="text/javascript" src="crypto.js"></script> |
| 22 | <script type="text/javascript" src="raytrace.js"></script> |
| 23 | <script type="text/javascript" src="earley-boyer.js"></script> |
| 24 | <script type="text/javascript" src="regexp.js"></script> |
| 25 | <script type="text/javascript" src="splay.js"></script> |
| 26 | <script type="text/javascript" src="navier-stokes.js"></script> |
| 27 | <script type="text/javascript" src="pdfjs.js"></script> |
| 28 | <script type="text/javascript" src="mandreel.js"></script> |
| 29 | <script type="text/javascript" src="gbemu.js"></script> |
| 30 | <script type="text/javascript" src="code-load.js"></script> |
| 31 | <script type="text/javascript" src="box2d.js"></script> |
| 32 | |
| 33 | <script type="text/javascript"> |
| 34 | var completed = 0; |
| 35 | var benchmarks = BenchmarkSuite.CountBenchmarks(); |
| 36 | var success = true; |
| 37 | |
| 38 | function ShowBox(name) { |
| 39 | var box = document.getElementById("Box-" + name); |
| 40 | box.style.visibility = 'visible'; |
| 41 | var bar = document.getElementById("progress-bar").style.width = "" |
| 42 | + ((++completed) / benchmarks) * 100 + "%"; |
| 43 | } |
| 44 | |
| 45 | function AddResult(name, result) { |
| 46 | console.log(name + ': ' + result); |
| 47 | var box = document.getElementById("Result-" + name); |
| 48 | box.innerHTML = result; |
| 49 | } |
| 50 | |
| 51 | function AddError(name, error) { |
| 52 | console.log(error); |
| 53 | if (error == "TypedArrayUnsupported") { |
| 54 | AddResult(name, '<b>Unsupported<\/b>'); |
| 55 | } else { |
| 56 | AddResult(name, '<b>Error</b>'); |
| 57 | } |
| 58 | success = false; |
| 59 | } |
| 60 | |
| 61 | function AddScore(score) { |
| 62 | var status = document.getElementById("main-banner"); |
| 63 | if (success) { |
| 64 | status.innerHTML = "Octane Score: " + score; |
| 65 | } else { |
| 66 | status.innerHTML = "Octane Score (incomplete): " + score; |
| 67 | } |
| 68 | // print the result for the host |
| 69 | console.log(status.innerHTML); |
| 70 | document.getElementById("progress-bar-container").style.visibility = 'hidden'; |
| 71 | document.getElementById("bottom-text").style.visibility = 'visible'; |
| 72 | document.getElementById("inside-anchor").removeChild(document.getElementById("bar-appendix")); |
| 73 | document.getElementById("warning-header").style.visibility = 'hidden'; |
| 74 | } |
| 75 | |
| 76 | function Run() { |
| 77 | document.getElementById("main-banner").innerHTML = "Running Octane..."; |
| 78 | // append the progress bar elements.. |
| 79 | document.getElementById("bar-appendix").innerHTML = "<br/><div class=\"progress progress-striped\" id=\"progress-bar-container\" style=\"visibility:hidden\"><div class=\"bar\"style=\"width: 0%;\" id=\"progress-bar\"></div></div>"; |
| 80 | var anchor = document.getElementById("run-octane"); |
| 81 | var parent = document.getElementById("main-container"); |
| 82 | parent.appendChild(document.getElementById("inside-anchor")); |
| 83 | parent.removeChild(anchor); |
| 84 | |
| 85 | document.getElementById("startup-text").innerHTML=""; |
| 86 | |
| 87 | document.getElementById("progress-bar-container").style.visibility = 'visible'; |
| 88 | |
| 89 | BenchmarkSuite.RunSuites({ |
| 90 | NotifyStart : ShowBox, |
| 91 | NotifyError : AddError, |
| 92 | NotifyResult : AddResult, |
| 93 | NotifyScore : AddScore |
| 94 | }); |
| 95 | } |
| 96 | |
| 97 | function CheckCompatibility() { |
| 98 | // If no Typed Arrays support, show warning label. |
| 99 | var hasTypedArrays = typeof Uint8Array != "undefined" |
| 100 | && typeof Float64Array != "undefined" |
| 101 | && typeof (new Uint8Array(0)).subarray != "undefined"; |
| 102 | |
| 103 | if (!hasTypedArrays) { |
| 104 | console.log("Typed Arrays not supported"); |
| 105 | document.getElementById("alertbox").style.display="block"; |
| 106 | } |
| 107 | if (window.document.URL.indexOf('auto=1') >= 0) |
| 108 | Run(); |
| 109 | } |
| 110 | |
| 111 | function Load() { |
| 112 | setTimeout(CheckCompatibility, 200); |
| 113 | } |
| 114 | </script> |
| 115 | <!-- end Octane benchmark code --> |
| 116 | |
| 117 | <!-- Le styles --> |
| 118 | <link href="css/bootstrap.css" rel="stylesheet"> |
| 119 | <style> |
| 120 | body { |
| 121 | padding-top: 60px; |
| 122 | /* 60px to make the container go all the way to the bottom of the topbar */ |
| 123 | } |
| 124 | </style> |
| 125 | <link href="css/bootstrap-responsive.css" rel="stylesheet"> |
| 126 | |
| 127 | <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements --> |
| 128 | <!--[if lt IE 9]> |
| 129 | <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
| 130 | <![endif]--> |
| 131 | |
| 132 | <!-- Le fav and touch icons --> |
| 133 | <!-- TODO update icons --> |
| 134 | <link rel="shortcut icon" href="ico/favicon.ico"> |
| 135 | <link rel="apple-touch-icon-precomposed" sizes="144x144" |
| 136 | href="ico/apple-touch-icon-144-precomposed.png"> |
| 137 | <link rel="apple-touch-icon-precomposed" sizes="114x114" |
| 138 | href="ico/apple-touch-icon-114-precomposed.png"> |
| 139 | <link rel="apple-touch-icon-precomposed" sizes="72x72" |
| 140 | href="ico/apple-touch-icon-72-precomposed.png"> |
| 141 | <link rel="apple-touch-icon-precomposed" |
| 142 | href="ico/apple-touch-icon-57-precomposed.png"> |
| 143 | </head> |
| 144 | |
| 145 | <body onLoad="Load()"> |
| 146 | |
| 147 | <div class="navbar navbar-fixed-top"> |
| 148 | <div class="navbar-inner"> |
| 149 | |
| 150 | <div class="container"> |
| 151 | |
| 152 | <a class="brand" href="#">Octane v1</a> |
| 153 | |
| 154 | <!--/.nav-collapse --> |
| 155 | </div> |
| 156 | |
| 157 | </div> |
| 158 | </div> |
| 159 | |
| 160 | <div class="container"> |
| 161 | <div class="alert" style="display:none" id="alertbox"> |
| 162 | <strong>Warning</strong> This JavaScript engine does not support Typed Arrays. You might want to run the <a href="http://v8.googlecode.com/svn/data/benchmarks/v7/run.html">V8 benchmark v7</a> instead. |
| 163 | </div> |
| 164 | <div id="main-container"> |
| 165 | <a id="run-octane" href="javascript:Run()"> |
| 166 | <div class="hero-unit" id="inside-anchor"> |
| 167 | <h1 align="center" id="main-banner">Start Octane</h1> |
| 168 | <div id="bar-appendix"></div> |
| 169 | </div> |
| 170 | </a> |
| 171 | </div> |
| 172 | |
| 173 | <div id="startup-text" style="color:white;" align="center"> |
| 174 | Welcome to Octane, a JavaScript benchmark for the modern web. For more accurate results, <a href="http://developers.google.com/octane/benchmark">start the browser anew</a> before running the test. Refer to the <a href="http://developers.google.com/octane">documentation</a> for more information on Octane. |
| 175 | </div> |
| 176 | |
| 177 | <div class="header"></div> |
| 178 | |
| 179 | <div class="content"> |
| 180 | <div class="row"> |
| 181 | <div class="span3"> |
| 182 | <!-- TODO STE change all links from staging to devsite --> |
| 183 | <div class="box" id="Box-Richards" style="visibility: hidden;"> |
| 184 | <a href="http://developers.google.com/octane/benchmark#richards" |
| 185 | target="_blank" style="float:left; color:#994520">Richards</a> |
| 186 | |
| 187 | <span class="p-result" id="Result-Richards" style="float:right">...</span> |
| 188 | <span class="label-simple" |
| 189 | style="position: absolute; bottom: 3px; left: 3px;">Core |
| 190 | language features</span> |
| 191 | </div> |
| 192 | |
| 193 | </div> |
| 194 | <div class="span3"> |
| 195 | <div class="box" id="Box-DeltaBlue" style="visibility: hidden;"> |
| 196 | <a href="http://developers.google.com/octane/benchmark#deltablue" |
| 197 | target="_blank" style="float:left; color:#994520">Deltablue</a> |
| 198 | |
| 199 | <p class="p-result" id="Result-DeltaBlue" style="float:right">...</p> |
| 200 | <span class="label-simple" |
| 201 | style="position: absolute; bottom: 3px; left: 3px;">Core |
| 202 | language features</span> |
| 203 | </div> |
| 204 | </div> |
| 205 | <div class="span3"> |
| 206 | <div class="box" id="Box-Crypto" style="visibility: hidden;"> |
| 207 | <a href="http://developers.google.com/octane/benchmark#crypto" |
| 208 | target="_blank" style="float:left; color:#994520">Crypto</a> |
| 209 | |
| 210 | <p class="p-result" id="Result-Crypto" style="float:right">...</p> |
| 211 | <span class="label-simple" |
| 212 | style="position: absolute; bottom: 3px; left: 3px;">Bit & |
| 213 | Math operations</span> |
| 214 | </div> |
| 215 | </div> |
| 216 | <div class="span3"> |
| 217 | <div class="box" id="Box-RayTrace" style="visibility: hidden;"> |
| 218 | <a href="http://developers.google.com/octane/benchmark#raytrace" |
| 219 | target="_blank" style="float:left; color:#994520">Raytrace</a> |
| 220 | |
| 221 | <p class="p-result" id="Result-RayTrace" style="float:right">...</p> |
| 222 | <span class="label-simple" |
| 223 | style="position: absolute; bottom: 3px; left: 3px;">Core |
| 224 | language features</span> |
| 225 | </div> |
| 226 | </div> |
| 227 | |
| 228 | </div> |
| 229 | <!-- /row --> |
| 230 | |
| 231 | <div class="row"> |
| 232 | |
| 233 | <div class="span3"> |
| 234 | <div class="box" id="Box-EarleyBoyer" style="visibility: hidden;"> |
| 235 | <a |
| 236 | href="http://developers.google.com/octane/benchmark#earleyboyer" |
| 237 | target="_blank" style="float:left; color:#994520">EarleyBoyer</a> |
| 238 | |
| 239 | <p class="p-result" id="Result-EarleyBoyer" style="float:right">...</p> |
| 240 | <span class="label-simple" |
| 241 | style="position: absolute; bottom: 3px; left: 3px;">Memory |
| 242 | & GC</span> |
| 243 | </div> |
| 244 | </div> |
| 245 | <div class="span3"> |
| 246 | <div class="box" id="Box-RegExp" style="visibility: hidden;"> |
| 247 | <a href="http://developers.google.com/octane/benchmark#regexp" |
| 248 | target="_blank" style="float:left; color:#994520">Regexp</a> |
| 249 | |
| 250 | <p class="p-result" id="Result-RegExp" style="float:right">...</p> |
| 251 | <span class="label-simple" |
| 252 | style="position: absolute; bottom: 3px; left: 3px;">Strings |
| 253 | & arrays</span> |
| 254 | </div> |
| 255 | </div> |
| 256 | <div class="span3"> |
| 257 | <div class="box" id="Box-Splay" style="visibility: hidden;"> |
| 258 | <a href="http://developers.google.com/octane/benchmark#splay" |
| 259 | target="_blank" style="float:left; color:#994520">Splay</a> |
| 260 | |
| 261 | <p class="p-result" id="Result-Splay" style="float:right">...</p> |
| 262 | <span class="label-simple" |
| 263 | style="position: absolute; bottom: 3px; left: 3px;">Memory |
| 264 | & GC</span> |
| 265 | </div> |
| 266 | </div> |
| 267 | <div class="span3"> |
| 268 | <div class="box" id="Box-NavierStokes" style="visibility: hidden;"> |
| 269 | <a |
| 270 | href="http://developers.google.com/octane/benchmark#navierstokes" |
| 271 | target="_blank" style="float:left; color:#994520">NavierStokes</a> |
| 272 | |
| 273 | <p class="p-result" id="Result-NavierStokes" style="float:right">...</p> |
| 274 | <span class="label-simple" |
| 275 | style="position: absolute; bottom: 3px; left: 3px;">Strings |
| 276 | & arrays</span> |
| 277 | </div> |
| 278 | </div> |
| 279 | |
| 280 | </div> |
| 281 | <!-- /row --> |
| 282 | |
| 283 | <div class="row"> |
| 284 | <div class="span3"> |
| 285 | <div class="box" id="Box-PdfJS" style="visibility: hidden;"> |
| 286 | <a href="http://developers.google.com/octane/benchmark#pdfjs" |
| 287 | target="_blank" style="float:left; color:#994520">pdf.js</a> |
| 288 | |
| 289 | <p class="p-result" id="Result-PdfJS" style="float:right">...</p> |
| 290 | <span class="label-simple" |
| 291 | style="position: absolute; bottom: 3px; left: 3px;">Strings |
| 292 | & arrays</span> |
| 293 | </div> |
| 294 | </div> |
| 295 | <div class="span3"> |
| 296 | <div class="box" id="Box-Mandreel" style="visibility: hidden;"> |
| 297 | <a href="http://developers.google.com/octane/benchmark#mandreel" |
| 298 | target="_blank" style="float:left; color:#994520">Mandreel</a> |
| 299 | |
| 300 | <p class="p-result" id="Result-Mandreel" style="float:right">...</p> |
| 301 | <span class="label-simple" |
| 302 | style="position: absolute; bottom: 3px; left: 3px;">Virtual |
| 303 | machine</span> |
| 304 | </div> |
| 305 | </div> |
| 306 | <div class="span3"> |
| 307 | <div class="box" id="Box-Gameboy" style="visibility: hidden;"> |
| 308 | <a |
| 309 | href="http://developers.google.com/octane/benchmark#gameboyemulator" |
| 310 | target="_blank" style="float:left; color:#994520">GB Emulator</a> |
| 311 | |
| 312 | <p class="p-result" id="Result-Gameboy" style="float:right">...</p> |
| 313 | <span class="label-simple" |
| 314 | style="position: absolute; bottom: 3px; left: 3px;">Virtual |
| 315 | machine</span> |
| 316 | </div> |
| 317 | </div> |
| 318 | <div class="span3"> |
| 319 | <div class="box" id="Box-CodeLoad" style="visibility: hidden;"> |
| 320 | <a href="http://developers.google.com/octane/benchmark#codeload" |
| 321 | target="_blank" style="float:left; color:#994520">CodeLoad</a> |
| 322 | |
| 323 | <p class="p-result" id="Result-CodeLoad" style="float:right">...</p> |
| 324 | <span class="label-simple" |
| 325 | style="position: absolute; bottom: 3px; left: 3px;">Loading |
| 326 | & Parsing</span> |
| 327 | </div> |
| 328 | </div> |
| 329 | |
| 330 | </div> |
| 331 | <!-- /row --> |
| 332 | |
| 333 | <div class="row"> |
| 334 | <div class="span3"> |
| 335 | <div class="box" id="Box-Box2D" style="visibility: hidden;"> |
| 336 | <a href="http://developers.google.com/octane/benchmark#box2d" |
| 337 | target="_blank" style="float:left; color:#994520">Box2DWeb</a> |
| 338 | |
| 339 | <p class="p-result" id="Result-Box2D" style="float:right">...</p> |
| 340 | <span class="label-simple" |
| 341 | style="position: absolute; bottom: 3px; left: 3px;">Bit & |
| 342 | Math operations</span> |
| 343 | </div> |
| 344 | </div> |
| 345 | |
| 346 | </div> |
| 347 | <!-- /row --> |
| 348 | |
| 349 | </div> |
| 350 | <!-- /content --> |
| 351 | |
| 352 | <div id="bottom-text" style="color:white; visibility:hidden" align="center"> |
| 353 | <br></br> |
| 354 | The final score is the <a href="http://en.wikipedia.org/wiki/Geometric_mean#Properties">geometric mean</a> of the single scores. We suggest to restart the browser before repeating the test. |
| 355 | </div> |
| 356 | |
| 357 | </div> |
| 358 | <!-- /container --> |
| 359 | |
| 360 | </body> |
| 361 | </html> |
| 362 | |
| 363 | <!-- |
| 364 | // Copyright 2012 the Octane project authors. All rights reserved. |
| 365 | // Redistribution and use in source and binary forms, with or without |
| 366 | // modification, are permitted provided that the following conditions are |
| 367 | // met: |
| 368 | // |
| 369 | // * Redistributions of source code must retain the above copyright |
| 370 | // notice, this list of conditions and the following disclaimer. |
| 371 | // * Redistributions in binary form must reproduce the above |
| 372 | // copyright notice, this list of conditions and the following |
| 373 | // disclaimer in the documentation and/or other materials provided |
| 374 | // with the distribution. |
| 375 | // * Neither the name of Google Inc. nor the names of its |
| 376 | // contributors may be used to endorse or promote products derived |
| 377 | // from this software without specific prior written permission. |
| 378 | // |
| 379 | // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
| 380 | // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
| 381 | // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR |
| 382 | // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT |
| 383 | // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, |
| 384 | // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT |
| 385 | // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
| 386 | // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY |
| 387 | // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 388 | // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 389 | // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 390 | --> |