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