Backed out changeset 2450366cf7ca (bug 1891629) for causing win msix mochitest failures
[gecko.git] / js / src / octane / index.html
blob77cbdfb46885e3fbdec249f796ce9c584b0c9a30
1 <!DOCTYPE html>
2 <!-- Copyright 2013 the V8 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 2.0 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 2.0 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-part1.js"></script>
30 <script type="text/javascript" src="gbemu-part2.js"></script>
31 <script type="text/javascript" src="code-load.js"></script>
32 <script type="text/javascript" src="box2d.js"></script>
33 <script type="text/javascript" src="zlib.js"></script>
34 <script type="text/javascript" src="zlib-data.js"></script>
35 <script type="text/javascript" src="typescript.js"></script>
36 <script type="text/javascript" src="typescript-input.js"></script>
37 <script type="text/javascript" src="typescript-compiler.js"></script>
39 <script type="text/javascript">
40 var completed = 0;
41 var benchmarks = BenchmarkSuite.CountBenchmarks();
42 var success = true;
43 var latencyBenchmarks = ["Splay", "Mandreel"];
44 var skipBenchmarks =
45 typeof skipBenchmarks === "undefined" ? [] : skipBenchmarks;
47 function ShowBox(name) {
48 var box = document.getElementById("Box-" + name);
49 box.style.visibility = 'visible';
50 var bar = document.getElementById("progress-bar").style.width = ""
51 + ((++completed) / benchmarks) * 100 + "%";
52 latencyBenchmarks.forEach(function(entry) {
53 if (name.valueOf() === entry.valueOf()) {
54 var box1 = document.getElementById("Box-" + name + "Latency");
55 box1.style.visibility = 'visible';
57 });
60 function AddResult(name, result) {
61 console.log(name + ': ' + result);
62 var box = document.getElementById("Result-" + name);
63 box.innerHTML = result;
66 function AddError(name, error) {
67 console.log(name + ": " + error.message);
68 if (error == "TypedArrayUnsupported") {
69 AddResult(name, '<b>Unsupported<\/b>');
70 } else if (error == "PerformanceNowUnsupported") {
71 AddResult(name, '<b>Timer error<\/b>');
72 } else {
73 AddResult(name, '<b>Error</b>');
75 success = false;
78 function AddScore(score) {
79 var status = document.getElementById("main-banner");
80 if (success) {
81 status.innerHTML = "Octane Score: " + score;
82 } else {
83 status.innerHTML = "Octane Score (incomplete): " + score;
85 document.getElementById("progress-bar-container").style.visibility = 'hidden';
86 document.getElementById("bottom-text").style.visibility = 'visible';
87 document.getElementById("inside-anchor").removeChild(document.getElementById("bar-appendix"));
88 document.getElementById("alertbox").style.visibility = 'hidden';
91 function Run() {
92 document.getElementById("main-banner").innerHTML = "Running Octane...";
93 // append the progress bar elements..
94 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>";
95 var anchor = document.getElementById("run-octane");
96 var parent = document.getElementById("main-container");
97 parent.appendChild(document.getElementById("inside-anchor"));
98 parent.removeChild(anchor);
100 document.getElementById("startup-text").innerHTML="";
102 document.getElementById("progress-bar-container").style.visibility = 'visible';
104 BenchmarkSuite.RunSuites({
105 NotifyStart : ShowBox,
106 NotifyError : AddError,
107 NotifyResult : AddResult,
108 NotifyScore : AddScore
110 skipBenchmarks);
113 function CheckCompatibility() {
114 // If no Typed Arrays support, show warning label.
115 var hasTypedArrays = typeof Uint8Array != "undefined"
116 && typeof Float64Array != "undefined"
117 && typeof (new Uint8Array(0)).subarray != "undefined";
119 if (!hasTypedArrays) {
120 console.log("Typed Arrays not supported");
121 document.getElementById("alertbox").style.display="block";
123 if (window.document.URL.indexOf('skip_zlib=1') >= 0)
124 skipBenchmarks.push("zlib");
125 if (window.document.URL.indexOf('auto=1') >= 0)
126 Run();
129 function Load() {
130 setTimeout(CheckCompatibility, 200);
132 </script>
133 <!-- end Octane benchmark code -->
135 <!-- Le styles -->
136 <link href="css/bootstrap.css" rel="stylesheet">
137 <style>
138 body {
139 padding-top: 60px;
140 /* 60px to make the container go all the way to the bottom of the topbar */
142 </style>
143 <link href="css/bootstrap-responsive.css" rel="stylesheet">
145 <!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
146 <!--[if lt IE 9]>
147 <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
148 <![endif]-->
150 <!-- Le fav and touch icons -->
151 <!-- TODO update icons -->
152 <link rel="shortcut icon" href="ico/favicon.ico">
153 <link rel="apple-touch-icon-precomposed" sizes="144x144"
154 href="ico/apple-touch-icon-144-precomposed.png">
155 <link rel="apple-touch-icon-precomposed" sizes="114x114"
156 href="ico/apple-touch-icon-114-precomposed.png">
157 <link rel="apple-touch-icon-precomposed" sizes="72x72"
158 href="ico/apple-touch-icon-72-precomposed.png">
159 <link rel="apple-touch-icon-precomposed"
160 href="ico/apple-touch-icon-57-precomposed.png">
161 </head>
163 <body onLoad="Load()">
165 <div class="navbar navbar-fixed-top">
166 <div class="navbar-inner">
168 <div class="container">
170 <a class="brand" href="#">Octane 2.0</a>
171 <!--/.nav-collapse -->
172 </div>
174 </div>
175 </div>
177 <div class="container">
178 <div class="alert" style="display:none" id="alertbox">
179 <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.
180 </div>
181 <div id="main-container">
182 <a id="run-octane" href="javascript:Run()">
183 <div class="hero-unit" id="inside-anchor">
184 <h1 align="center" id="main-banner">Start Octane 2.0</h1>
185 <div id="bar-appendix"></div>
186 </div>
187 </a>
188 </div>
190 <div id="startup-text" style="color:white;" align="center">
191 Welcome to Octane 2.0, 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.
192 <br/><br/>
193 <a href="http://developers.google.com/octane/benchmark#whatsnew" target="_blank">What's new in Octane 2.0</a> - <a href="http://developers.google.com/octane/">Documentation</a> - <a href="http://octane-benchmark.googlecode.com/svn/tags/v1/index.html">Run Octane v1</a>
194 </div>
197 <div class="header"></div>
199 <div class="content">
200 <div class="row">
201 <div class="span3">
202 <div class="box" id="Box-Richards" style="visibility: hidden;">
203 <a href="http://developers.google.com/octane/benchmark#richards"
204 target="_blank" style="float:left; color:#994520">Richards</a>
206 <span class="p-result" id="Result-Richards" style="float:right">...</span>
207 <span class="label-simple"
208 style="position: absolute; bottom: 3px; left: 3px;">Core
209 language features</span>
210 </div>
212 </div>
213 <div class="span3">
214 <div class="box" id="Box-DeltaBlue" style="visibility: hidden;">
215 <a href="http://developers.google.com/octane/benchmark#deltablue"
216 target="_blank" style="float:left; color:#994520">Deltablue</a>
218 <p class="p-result" id="Result-DeltaBlue" style="float:right">...</p>
219 <span class="label-simple"
220 style="position: absolute; bottom: 3px; left: 3px;">Core
221 language features</span>
222 </div>
223 </div>
224 <div class="span3">
225 <div class="box" id="Box-Crypto" style="visibility: hidden;">
226 <a href="http://developers.google.com/octane/benchmark#crypto"
227 target="_blank" style="float:left; color:#994520">Crypto</a>
229 <p class="p-result" id="Result-Crypto" style="float:right">...</p>
230 <span class="label-simple"
231 style="position: absolute; bottom: 3px; left: 3px;">Bit &
232 Math operations</span>
233 </div>
234 </div>
235 <div class="span3">
236 <div class="box" id="Box-RayTrace" style="visibility: hidden;">
237 <a href="http://developers.google.com/octane/benchmark#raytrace"
238 target="_blank" style="float:left; color:#994520">Raytrace</a>
240 <p class="p-result" id="Result-RayTrace" style="float:right">...</p>
241 <span class="label-simple"
242 style="position: absolute; bottom: 3px; left: 3px;">Core
243 language features</span>
244 </div>
245 </div>
247 </div>
248 <!-- /row -->
250 <div class="row">
252 <div class="span3">
253 <div class="box" id="Box-EarleyBoyer" style="visibility: hidden;">
255 href="http://developers.google.com/octane/benchmark#earleyboyer"
256 target="_blank" style="float:left; color:#994520">EarleyBoyer</a>
258 <p class="p-result" id="Result-EarleyBoyer" style="float:right">...</p>
259 <span class="label-simple"
260 style="position: absolute; bottom: 3px; left: 3px;">Memory
261 & GC</span>
262 </div>
263 </div>
264 <div class="span3">
265 <div class="box" id="Box-RegExp" style="visibility: hidden;">
266 <a href="http://developers.google.com/octane/benchmark#regexp"
267 target="_blank" style="float:left; color:#994520">Regexp</a>
269 <p class="p-result" id="Result-RegExp" style="float:right">...</p>
270 <span class="label-simple"
271 style="position: absolute; bottom: 3px; left: 3px;">Strings
272 & arrays</span>
273 </div>
274 </div>
275 <div class="span3">
276 <div class="box" id="Box-Splay" style="visibility: hidden;">
277 <a href="http://developers.google.com/octane/benchmark#splay"
278 target="_blank" style="float:left; color:#994520">Splay</a>
280 <p class="p-result" id="Result-Splay" style="float:right">...</p>
281 <span class="label-simple"
282 style="position: absolute; bottom: 3px; left: 3px;">Memory
283 & GC</span>
284 </div>
285 </div>
286 <div class="span3">
287 <div class="box" id="Box-SplayLatency" style="visibility: hidden;">
288 <a href="http://developers.google.com/octane/benchmark#splaylatency"
289 target="_blank" style="float:left; color:#994520">SplayLatency</a>
291 <p class="p-result" id="Result-SplayLatency" style="float:right">...</p>
292 <span class="label-simple"
293 style="position: absolute; bottom: 3px; left: 3px;">GC latency
294 </span>
295 </div>
296 </div>
298 </div>
299 <!-- /row -->
301 <div class="row">
302 <div class="span3">
303 <div class="box" id="Box-NavierStokes" style="visibility: hidden;">
305 href="http://developers.google.com/octane/benchmark#navierstokes"
306 target="_blank" style="float:left; color:#994520">NavierStokes</a>
308 <p class="p-result" id="Result-NavierStokes" style="float:right">...</p>
309 <span class="label-simple"
310 style="position: absolute; bottom: 3px; left: 3px;">Strings
311 & arrays</span>
312 </div>
313 </div>
314 <div class="span3">
315 <div class="box" id="Box-PdfJS" style="visibility: hidden;">
316 <a href="http://developers.google.com/octane/benchmark#pdfjs"
317 target="_blank" style="float:left; color:#994520">pdf.js</a>
319 <p class="p-result" id="Result-PdfJS" style="float:right">...</p>
320 <span class="label-simple"
321 style="position: absolute; bottom: 3px; left: 3px;">Strings
322 & arrays</span>
323 </div>
324 </div>
325 <div class="span3">
326 <div class="box" id="Box-Mandreel" style="visibility: hidden;">
327 <a href="http://developers.google.com/octane/benchmark#mandreel"
328 target="_blank" style="float:left; color:#994520">Mandreel</a>
330 <p class="p-result" id="Result-Mandreel" style="float:right">...</p>
331 <span class="label-simple"
332 style="position: absolute; bottom: 3px; left: 3px;">Virtual
333 machine</span>
334 </div>
335 </div>
336 <div class="span3">
337 <div class="box" id="Box-MandreelLatency" style="visibility: hidden;">
338 <a href="http://developers.google.com/octane/benchmark#mandreellatency"
339 target="_blank" style="float:left; color:#994520">MandreelLatency</a>
341 <p class="p-result" id="Result-MandreelLatency" style="float:right">...</p>
342 <span class="label-simple"
343 style="position: absolute; bottom: 3px; left: 3px;">Compiler latency
344 </span>
345 </div>
346 </div>
348 </div>
349 <!-- /row -->
351 <div class="row">
352 <div class="span3">
353 <div class="box" id="Box-Gameboy" style="visibility: hidden;">
355 href="http://developers.google.com/octane/benchmark#gameboyemulator"
356 target="_blank" style="float:left; color:#994520">GB Emulator</a>
358 <p class="p-result" id="Result-Gameboy" style="float:right">...</p>
359 <span class="label-simple"
360 style="position: absolute; bottom: 3px; left: 3px;">Virtual
361 machine</span>
362 </div>
363 </div>
364 <div class="span3">
365 <div class="box" id="Box-CodeLoad" style="visibility: hidden;">
366 <a href="http://developers.google.com/octane/benchmark#codeload"
367 target="_blank" style="float:left; color:#994520">CodeLoad</a>
369 <p class="p-result" id="Result-CodeLoad" style="float:right">...</p>
370 <span class="label-simple"
371 style="position: absolute; bottom: 3px; left: 3px;">Loading
372 & Parsing</span>
373 </div>
374 </div>
375 <div class="span3">
376 <div class="box" id="Box-Box2D" style="visibility: hidden;">
377 <a href="http://developers.google.com/octane/benchmark#box2d"
378 target="_blank" style="float:left; color:#994520">Box2DWeb</a>
380 <p class="p-result" id="Result-Box2D" style="float:right">...</p>
381 <span class="label-simple"
382 style="position: absolute; bottom: 3px; left: 3px;">Bit &
383 Math operations</span>
384 </div>
385 </div>
386 <div class="span3">
387 <div class="box" id="Box-zlib" style="visibility: hidden;">
388 <a href="http://developers.google.com/octane/benchmark#zlib"
389 target="_blank" style="float:left; color:#994520">zlib</a>
391 <p class="p-result" id="Result-zlib" style="float:right">...</p>
392 <span class="label-simple"
393 style="position: absolute; bottom: 3px; left: 3px;">asm.js</span>
394 </div>
395 </div>
396 <div class="span3">
397 <div class="box" id="Box-Typescript" style="visibility: hidden;">
398 <a href="http://developers.google.com/octane/benchmark#typescript"
399 target="_blank" style="float:left; color:#994520">Typescript</a>
401 <p class="p-result" id="Result-Typescript" style="float:right">...</p>
402 <span class="label-simple"
403 style="position: absolute; bottom: 3px; left: 3px;">Virtual machine & GC
404 </span>
405 </div>
406 </div>
408 </div>
409 <!-- /row -->
411 </div>
412 <!-- /content -->
414 <div id="bottom-text" style="color:white; visibility:hidden" align="center">
415 <br></br>
416 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.
417 </div>
419 </div>
420 <!-- /container -->
422 </body>
423 </html>
425 <!--
426 // Copyright 2013 the V8 project authors (http://code.google.com/p/v8/).
427 // All rights reserved.
428 // Redistribution and use in source and binary forms, with or without
429 // modification, are permitted provided that the following conditions are
430 // met:
432 // * Redistributions of source code must retain the above copyright
433 // notice, this list of conditions and the following disclaimer.
434 // * Redistributions in binary form must reproduce the above
435 // copyright notice, this list of conditions and the following
436 // disclaimer in the documentation and/or other materials provided
437 // with the distribution.
438 // * Neither the name of Google Inc. nor the names of its
439 // contributors may be used to endorse or promote products derived
440 // from this software without specific prior written permission.
442 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
443 // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
444 // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
445 // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
446 // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
447 // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
448 // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
449 // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
450 // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
451 // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
452 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.