summaryrefslogtreecommitdiffstats
path: root/js/src/octane/index.html
blob: 77cbdfb46885e3fbdec249f796ce9c584b0c9a30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
<!DOCTYPE html>
<!-- Copyright 2013 the V8 project authors. Scroll to the end for full license -->
<html lang="en">
<head>
<meta http-equiv="X-UA-Compatible" value="IE=edge"/>
<meta charset="utf-8"/>
<title>Octane 2.0 JavaScript Benchmark</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="Content-Script-Type" content="text/javascript">
<meta name="description"
  content="Octane 2.0 JavaScript Benchmark - the Javascript benchmark for the modern web">
<meta name="author" content="Octane Team Google">
<!-- twitter bootstrap code -->
<script src="js/jquery.js"></script>
<script src="js/bootstrap-transition.js"></script>
<script src="js/bootstrap-collapse.js"></script>
<!-- Octane benchmark code -->
<script type="text/javascript" src="base.js"></script>
<script type="text/javascript" src="richards.js"></script>
<script type="text/javascript" src="deltablue.js"></script>
<script type="text/javascript" src="crypto.js"></script>
<script type="text/javascript" src="raytrace.js"></script>
<script type="text/javascript" src="earley-boyer.js"></script>
<script type="text/javascript" src="regexp.js"></script>
<script type="text/javascript" src="splay.js"></script>
<script type="text/javascript" src="navier-stokes.js"></script>
<script type="text/javascript" src="pdfjs.js"></script>
<script type="text/javascript" src="mandreel.js"></script>
<script type="text/javascript" src="gbemu-part1.js"></script>
<script type="text/javascript" src="gbemu-part2.js"></script>
<script type="text/javascript" src="code-load.js"></script>
<script type="text/javascript" src="box2d.js"></script>
<script type="text/javascript" src="zlib.js"></script>
<script type="text/javascript" src="zlib-data.js"></script>
<script type="text/javascript" src="typescript.js"></script>
<script type="text/javascript" src="typescript-input.js"></script>
<script type="text/javascript" src="typescript-compiler.js"></script>

<script type="text/javascript">
  var completed = 0;
  var benchmarks = BenchmarkSuite.CountBenchmarks();
  var success = true;
  var latencyBenchmarks = ["Splay", "Mandreel"];
  var skipBenchmarks =
          typeof skipBenchmarks === "undefined" ? [] : skipBenchmarks;

  function ShowBox(name) {
    var box = document.getElementById("Box-" + name);
    box.style.visibility = 'visible';
    var bar = document.getElementById("progress-bar").style.width = ""
        + ((++completed) / benchmarks) * 100 + "%";
    latencyBenchmarks.forEach(function(entry) {
      if (name.valueOf() === entry.valueOf()) {
        var box1 = document.getElementById("Box-" + name + "Latency");
        box1.style.visibility = 'visible';
      }
    });
  }

  function AddResult(name, result) {
    console.log(name + ': ' + result);
    var box = document.getElementById("Result-" + name);
    box.innerHTML = result;
  }

  function AddError(name, error) {
    console.log(name + ": " + error.message);
    if (error == "TypedArrayUnsupported") {
      AddResult(name, '<b>Unsupported<\/b>');
    } else if (error == "PerformanceNowUnsupported") {
      AddResult(name, '<b>Timer error<\/b>');
    } else {
      AddResult(name, '<b>Error</b>');
    }
    success = false;
  }

  function AddScore(score) {
    var status = document.getElementById("main-banner");
    if (success) {
      status.innerHTML = "Octane Score: " + score;
    } else {
      status.innerHTML = "Octane Score (incomplete): " + score;
    }
    document.getElementById("progress-bar-container").style.visibility = 'hidden';
    document.getElementById("bottom-text").style.visibility = 'visible';
    document.getElementById("inside-anchor").removeChild(document.getElementById("bar-appendix"));
    document.getElementById("alertbox").style.visibility = 'hidden';
  }

  function Run() {
    document.getElementById("main-banner").innerHTML = "Running Octane...";
    // append the progress bar elements..
    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>";
    var anchor = document.getElementById("run-octane");
    var parent = document.getElementById("main-container");
    parent.appendChild(document.getElementById("inside-anchor"));
    parent.removeChild(anchor);

    document.getElementById("startup-text").innerHTML="";

    document.getElementById("progress-bar-container").style.visibility = 'visible';

    BenchmarkSuite.RunSuites({
      NotifyStart : ShowBox,
      NotifyError : AddError,
      NotifyResult : AddResult,
      NotifyScore : AddScore
    },
    skipBenchmarks);
  }

  function CheckCompatibility() {
    // If no Typed Arrays support, show warning label.
    var hasTypedArrays = typeof Uint8Array != "undefined"
        && typeof Float64Array != "undefined"
        && typeof (new Uint8Array(0)).subarray != "undefined";

    if (!hasTypedArrays) {
      console.log("Typed Arrays not supported");
      document.getElementById("alertbox").style.display="block";
    }
    if (window.document.URL.indexOf('skip_zlib=1') >= 0)
      skipBenchmarks.push("zlib");
    if (window.document.URL.indexOf('auto=1') >= 0)
      Run();
  }

  function Load() {
    setTimeout(CheckCompatibility, 200);
  }
</script>
<!-- end Octane benchmark code -->

<!-- Le styles -->
<link href="css/bootstrap.css" rel="stylesheet">
<style>
body {
  padding-top: 60px;
  /* 60px to make the container go all the way to the bottom of the topbar */
}
</style>
<link href="css/bootstrap-responsive.css" rel="stylesheet">

<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->

<!-- Le fav and touch icons -->
<!-- TODO update icons -->
<link rel="shortcut icon" href="ico/favicon.ico">
<link rel="apple-touch-icon-precomposed" sizes="144x144"
  href="ico/apple-touch-icon-144-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="114x114"
  href="ico/apple-touch-icon-114-precomposed.png">
<link rel="apple-touch-icon-precomposed" sizes="72x72"
  href="ico/apple-touch-icon-72-precomposed.png">
<link rel="apple-touch-icon-precomposed"
  href="ico/apple-touch-icon-57-precomposed.png">
</head>

<body onLoad="Load()">

  <div class="navbar navbar-fixed-top">
    <div class="navbar-inner">

      <div class="container">

        <a class="brand" href="#">Octane 2.0</a>
        <!--/.nav-collapse -->
      </div>

    </div>
  </div>

  <div class="container">
    <div class="alert" style="display:none" id="alertbox">
       <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.
    </div>
    <div id="main-container">
    <a id="run-octane" href="javascript:Run()">
      <div class="hero-unit" id="inside-anchor">
        <h1 align="center" id="main-banner">Start Octane 2.0</h1>
        <div id="bar-appendix"></div>
      </div>
    </a>
    </div>

    <div id="startup-text" style="color:white;" align="center">
      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. 
    <br/><br/>
      <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>
    </div>


    <div class="header"></div>

    <div class="content">
      <div class="row">
        <div class="span3">
          <div class="box" id="Box-Richards" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#richards"
              target="_blank" style="float:left; color:#994520">Richards</a>
   
            <span class="p-result" id="Result-Richards" style="float:right">...</span>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Core
              language features</span>
          </div>

        </div>
        <div class="span3">
          <div class="box" id="Box-DeltaBlue" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#deltablue"
              target="_blank" style="float:left; color:#994520">Deltablue</a>
           
            <p class="p-result" id="Result-DeltaBlue" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Core
              language features</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-Crypto" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#crypto"
              target="_blank" style="float:left; color:#994520">Crypto</a>
           
            <p class="p-result" id="Result-Crypto" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Bit &
              Math operations</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-RayTrace" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#raytrace"
              target="_blank" style="float:left; color:#994520">Raytrace</a>
   
            <p class="p-result" id="Result-RayTrace" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Core
              language features</span>
          </div>
        </div>

      </div>
      <!-- /row -->

      <div class="row">

        <div class="span3">
          <div class="box" id="Box-EarleyBoyer" style="visibility: hidden;">
            <a
              href="http://developers.google.com/octane/benchmark#earleyboyer"
              target="_blank" style="float:left; color:#994520">EarleyBoyer</a>
           
            <p class="p-result" id="Result-EarleyBoyer" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Memory
              & GC</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-RegExp" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#regexp"
              target="_blank" style="float:left; color:#994520">Regexp</a>
           
            <p class="p-result" id="Result-RegExp" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Strings
              & arrays</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-Splay" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#splay"
              target="_blank" style="float:left; color:#994520">Splay</a>
           
            <p class="p-result" id="Result-Splay" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Memory
              & GC</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-SplayLatency" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#splaylatency"
              target="_blank" style="float:left; color:#994520">SplayLatency</a>

            <p class="p-result" id="Result-SplayLatency" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">GC latency
            </span>
          </div>
        </div>

      </div>
      <!-- /row -->

      <div class="row">
        <div class="span3">
          <div class="box" id="Box-NavierStokes" style="visibility: hidden;">
            <a
              href="http://developers.google.com/octane/benchmark#navierstokes"
              target="_blank" style="float:left; color:#994520">NavierStokes</a>

            <p class="p-result" id="Result-NavierStokes" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Strings
              & arrays</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-PdfJS" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#pdfjs"
              target="_blank" style="float:left; color:#994520">pdf.js</a>
           
            <p class="p-result" id="Result-PdfJS" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Strings
              & arrays</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-Mandreel" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#mandreel"
              target="_blank" style="float:left; color:#994520">Mandreel</a>
           
            <p class="p-result" id="Result-Mandreel" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Virtual
              machine</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-MandreelLatency" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#mandreellatency"
              target="_blank" style="float:left; color:#994520">MandreelLatency</a>

            <p class="p-result" id="Result-MandreelLatency" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Compiler latency
            </span>
          </div>
        </div>

      </div>
      <!-- /row -->

      <div class="row">
        <div class="span3">
          <div class="box" id="Box-Gameboy" style="visibility: hidden;">
            <a
              href="http://developers.google.com/octane/benchmark#gameboyemulator"
              target="_blank" style="float:left; color:#994520">GB Emulator</a>

            <p class="p-result" id="Result-Gameboy" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Virtual
              machine</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-CodeLoad" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#codeload"
              target="_blank" style="float:left; color:#994520">CodeLoad</a>

            <p class="p-result" id="Result-CodeLoad" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Loading
              & Parsing</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-Box2D" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#box2d"
              target="_blank" style="float:left; color:#994520">Box2DWeb</a>
           
            <p class="p-result" id="Result-Box2D" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Bit &
              Math operations</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-zlib" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#zlib"
              target="_blank" style="float:left; color:#994520">zlib</a>
           
            <p class="p-result" id="Result-zlib" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">asm.js</span>
          </div>
        </div>
        <div class="span3">
          <div class="box" id="Box-Typescript" style="visibility: hidden;">
            <a href="http://developers.google.com/octane/benchmark#typescript"
              target="_blank" style="float:left; color:#994520">Typescript</a>
           
            <p class="p-result" id="Result-Typescript" style="float:right">...</p>
            <span class="label-simple"
              style="position: absolute; bottom: 3px; left: 3px;">Virtual machine & GC
            </span>
          </div>
        </div>

      </div>
      <!-- /row -->

    </div>
    <!-- /content -->

    <div id="bottom-text" style="color:white; visibility:hidden" align="center">
      <br></br>
       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.
    </div>

  </div>
  <!-- /container -->

</body>
</html>

<!--
// Copyright 2013 the V8 project authors (http://code.google.com/p/v8/). 
// All rights reserved.
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
//     * Redistributions of source code must retain the above copyright
//       notice, this list of conditions and the following disclaimer.
//     * Redistributions in binary form must reproduce the above
//       copyright notice, this list of conditions and the following
//       disclaimer in the documentation and/or other materials provided
//       with the distribution.
//     * Neither the name of Google Inc. nor the names of its
//       contributors may be used to endorse or promote products derived
//       from this software without specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-->