<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[202613] trunk/PerformanceTests</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/202613">202613</a></dd>
<dt>Author</dt> <dd>fpizlo@apple.com</dd>
<dt>Date</dt> <dd>2016-06-28 22:55:37 -0700 (Tue, 28 Jun 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>ES6SampleBench should have a harness
https://bugs.webkit.org/show_bug.cgi?id=159246

Reviewed by Saam Barati.
        
This adds a simple web harness for ES6SampleBench. It runs Air and Basic 10 times for 200
iterations each and reports three metrics:
        
First iteration: the time it takes for the first iteration to run. This is the first
iteration after the benchmark is loaded into the iframe, so it's representative of what
would happen if one of these workloads only ran for a short time.
        
Worst 2%: of the last 199 iterations, the average of the worst 2% iterations. If code like
any of these workloads was used in an important event handler, you'd want that code to run
well in the worst case in addition to having great throughput.
        
Steady state: the total of the last 199 iterations. This is representative of what would
happen if you ran code like this for a long time.
        
The total score is the geomean of the firstIteration/worstCase/steadyState numbers of the
two benchmarks.
        
The harness does statistics using Student's T-distribution confidence intervals.

* ES6SampleBench/Basic/benchmark.js:
(Benchmark):
* ES6SampleBench/air_benchmark.js: Added.
* ES6SampleBench/basic_benchmark.js: Added.
* ES6SampleBench/driver.js: Added.
(Driver):
(Driver.prototype.addBenchmark):
(Driver.prototype.start):
(Driver.prototype.reportResult):
(Driver.prototype.reportError):
(Driver.prototype._recomputeSummary.Geomean):
(Driver.prototype._recomputeSummary.Geomean.prototype.add):
(Driver.prototype._recomputeSummary.Geomean.prototype.get result):
(Driver.prototype._recomputeSummary):
(Driver.prototype._iterate):
(Driver.prototype._updateIterations):
* ES6SampleBench/glue.js: Added.
* ES6SampleBench/index.html: Added.
* ES6SampleBench/results.js: Added.
(Results):
(Results.prototype.get benchmark):
(Results.prototype.reset):
(Results.prototype.reportRunning):
(Results.prototype.reportDone):
(Results.prototype.reportResult.averageAbovePercentile):
(Results.prototype.reportResult):
(Results.prototype.reportError):
* ES6SampleBench/stats.js: Added.
(Stats):
(Stats.prototype.reset):
(Stats.prototype.add):
(Stats.prototype.get numIterations):
(Stats.prototype.valueForIteration):
(Stats.get result.tDist):
(Stats.prototype.get result):
(Stats.prototype.toString):
(Stats.prototype._update):
* ES6SampleBench/style.css: Added.
(body):
(body, th, tr):
(h1, h2, h3, h4):
(h1):
(h2):
(h3):
(hr):
(address):
(img):
(.underline):
(ol.loweralpha):
(ol.upperalpha):
(ol.lowerroman):
(ol.upperroman):
(ol.arabic):
(.banner-link:link, .banner-link:visited):
(:link, :visited):
(h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited):
(.anchor:link, .anchor:visited):
(* &gt; .anchor:link, * &gt; .anchor:visited):
(span:hover .anchor):
(a.forbidden, span.forbidden):
(a.missing:hover):
(a.closed:link, a.closed:visited, span.closed):
(pre):
(div.code):
(div.code pre):
(dt):
(dd):
(dd:last-child):
(.site-logo):
(.site-logo .tagline):
(table):
(#contents):
(p):
(p:last-child):
(th):
(td):</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchBasicbenchmarkjs">trunk/PerformanceTests/ES6SampleBench/Basic/benchmark.js</a></li>
</ul>

<h3>Added Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsES6SampleBenchair_benchmarkjs">trunk/PerformanceTests/ES6SampleBench/air_benchmark.js</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchbasic_benchmarkjs">trunk/PerformanceTests/ES6SampleBench/basic_benchmark.js</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchdriverjs">trunk/PerformanceTests/ES6SampleBench/driver.js</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchgluejs">trunk/PerformanceTests/ES6SampleBench/glue.js</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchindexhtml">trunk/PerformanceTests/ES6SampleBench/index.html</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchresultsjs">trunk/PerformanceTests/ES6SampleBench/results.js</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchstatsjs">trunk/PerformanceTests/ES6SampleBench/stats.js</a></li>
<li><a href="#trunkPerformanceTestsES6SampleBenchstylecss">trunk/PerformanceTests/ES6SampleBench/style.css</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (202612 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2016-06-29 05:04:28 UTC (rev 202612)
+++ trunk/PerformanceTests/ChangeLog        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -1,3 +1,106 @@
</span><ins>+2016-06-28  Filip Pizlo  &lt;fpizlo@apple.com&gt;
+
+        ES6SampleBench should have a harness
+        https://bugs.webkit.org/show_bug.cgi?id=159246
+
+        Reviewed by Saam Barati.
+        
+        This adds a simple web harness for ES6SampleBench. It runs Air and Basic 10 times for 200
+        iterations each and reports three metrics:
+        
+        First iteration: the time it takes for the first iteration to run. This is the first
+        iteration after the benchmark is loaded into the iframe, so it's representative of what
+        would happen if one of these workloads only ran for a short time.
+        
+        Worst 2%: of the last 199 iterations, the average of the worst 2% iterations. If code like
+        any of these workloads was used in an important event handler, you'd want that code to run
+        well in the worst case in addition to having great throughput.
+        
+        Steady state: the total of the last 199 iterations. This is representative of what would
+        happen if you ran code like this for a long time.
+        
+        The total score is the geomean of the firstIteration/worstCase/steadyState numbers of the
+        two benchmarks.
+        
+        The harness does statistics using Student's T-distribution confidence intervals.
+
+        * ES6SampleBench/Basic/benchmark.js:
+        (Benchmark):
+        * ES6SampleBench/air_benchmark.js: Added.
+        * ES6SampleBench/basic_benchmark.js: Added.
+        * ES6SampleBench/driver.js: Added.
+        (Driver):
+        (Driver.prototype.addBenchmark):
+        (Driver.prototype.start):
+        (Driver.prototype.reportResult):
+        (Driver.prototype.reportError):
+        (Driver.prototype._recomputeSummary.Geomean):
+        (Driver.prototype._recomputeSummary.Geomean.prototype.add):
+        (Driver.prototype._recomputeSummary.Geomean.prototype.get result):
+        (Driver.prototype._recomputeSummary):
+        (Driver.prototype._iterate):
+        (Driver.prototype._updateIterations):
+        * ES6SampleBench/glue.js: Added.
+        * ES6SampleBench/index.html: Added.
+        * ES6SampleBench/results.js: Added.
+        (Results):
+        (Results.prototype.get benchmark):
+        (Results.prototype.reset):
+        (Results.prototype.reportRunning):
+        (Results.prototype.reportDone):
+        (Results.prototype.reportResult.averageAbovePercentile):
+        (Results.prototype.reportResult):
+        (Results.prototype.reportError):
+        * ES6SampleBench/stats.js: Added.
+        (Stats):
+        (Stats.prototype.reset):
+        (Stats.prototype.add):
+        (Stats.prototype.get numIterations):
+        (Stats.prototype.valueForIteration):
+        (Stats.get result.tDist):
+        (Stats.prototype.get result):
+        (Stats.prototype.toString):
+        (Stats.prototype._update):
+        * ES6SampleBench/style.css: Added.
+        (body):
+        (body, th, tr):
+        (h1, h2, h3, h4):
+        (h1):
+        (h2):
+        (h3):
+        (hr):
+        (address):
+        (img):
+        (.underline):
+        (ol.loweralpha):
+        (ol.upperalpha):
+        (ol.lowerroman):
+        (ol.upperroman):
+        (ol.arabic):
+        (.banner-link:link, .banner-link:visited):
+        (:link, :visited):
+        (h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited):
+        (.anchor:link, .anchor:visited):
+        (* &gt; .anchor:link, * &gt; .anchor:visited):
+        (span:hover .anchor):
+        (a.forbidden, span.forbidden):
+        (a.missing:hover):
+        (a.closed:link, a.closed:visited, span.closed):
+        (pre):
+        (div.code):
+        (div.code pre):
+        (dt):
+        (dd):
+        (dd:last-child):
+        (.site-logo):
+        (.site-logo .tagline):
+        (table):
+        (#contents):
+        (p):
+        (p:last-child):
+        (th):
+        (td):
+
</ins><span class="cx"> 2016-06-28  Jon Lee  &lt;jonlee@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Update focus test
</span></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchBasicbenchmarkjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ES6SampleBench/Basic/benchmark.js (202612 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/Basic/benchmark.js        2016-06-29 05:04:28 UTC (rev 202612)
+++ trunk/PerformanceTests/ES6SampleBench/Basic/benchmark.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -25,7 +25,7 @@
</span><span class="cx"> &quot;use strict&quot;;
</span><span class="cx"> 
</span><span class="cx"> class Benchmark {
</span><del>-    constructor(verbose)
</del><ins>+    constructor(verbose = 0)
</ins><span class="cx">     {
</span><span class="cx">         this._verbose = verbose;
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchair_benchmarkjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/air_benchmark.js (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/air_benchmark.js                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/air_benchmark.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,71 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. 
+ */
+&quot;use strict&quot;;
+
+const AirBenchmarkCode = String.raw`
+&lt;script src=&quot;Air/symbols.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/tmp_base.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/arg.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/basic_block.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/code.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/frequented_block.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/inst.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/opcode.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/reg.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/stack_slot.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/tmp.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/util.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/custom.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/liveness.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/insertion_set.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/allocate_stack.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/payload-gbemu-executeIteration.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/payload-imaging-gaussian-blur-gaussianBlur.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/payload-airjs-ACLj8C.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/payload-typescript-scanIdentifier.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Air/benchmark.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var results = [];
+var benchmark = new Benchmark();
+var numIterations = 200;
+for (var i = 0; i &lt; numIterations; ++i) {
+    var before = currentTime();
+    benchmark.runIteration();
+    var after = currentTime();
+    results.push(after - before);
+}
+reportResult(results);
+&lt;/script&gt;`;
+
+const AirBenchmark = {
+    code: AirBenchmarkCode,
+    cells: {
+        firstIteration: document.getElementById(&quot;AirFirstIteration&quot;),
+        averageWorstCase: document.getElementById(&quot;AirAverageWorstCase&quot;),
+        steadyState: document.getElementById(&quot;AirSteadyState&quot;),
+        message: document.getElementById(&quot;AirMessage&quot;)
+    }
+};
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchbasic_benchmarkjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/basic_benchmark.js (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/basic_benchmark.js                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/basic_benchmark.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,59 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. 
+ */
+&quot;use strict&quot;;
+
+const BasicBenchmarkCode = String.raw`
+&lt;script src=&quot;Basic/ast.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/basic.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/caseless_map.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/lexer.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/number.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/parser.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/random.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/state.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/util.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;Basic/benchmark.js&quot;&gt;&lt;/script&gt;
+&lt;script&gt;
+var results = [];
+var benchmark = new Benchmark();
+var numIterations = 200;
+for (var i = 0; i &lt; numIterations; ++i) {
+    var before = currentTime();
+    benchmark.runIteration();
+    var after = currentTime();
+    results.push(after - before);
+}
+reportResult(results);
+&lt;/script&gt;`;
+
+const BasicBenchmark = {
+    code: BasicBenchmarkCode,
+    cells: {
+        firstIteration: document.getElementById(&quot;BasicFirstIteration&quot;),
+        averageWorstCase: document.getElementById(&quot;BasicAverageWorstCase&quot;),
+        steadyState: document.getElementById(&quot;BasicSteadyState&quot;),
+        message: document.getElementById(&quot;BasicMessage&quot;)
+    }
+};
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchdriverjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/driver.js (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/driver.js                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/driver.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,161 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. 
+ */
+&quot;use strict&quot;;
+
+class Driver {
+    constructor(triggerCell, magicCell, summaryCell, key)
+    {
+        if (!magicCell)
+            throw new Error(&quot;Need magic cell&quot;);
+        if (!summaryCell)
+            throw new Error(&quot;Need summary cell&quot;);
+        
+        this._benchmarks = new Map();
+        this._triggerCell = triggerCell;
+        this._magicCell = magicCell;
+        this._summary = new Stats(summaryCell);
+        this._key = key;
+        window[key] = this;
+    }
+    
+    addBenchmark(benchmark)
+    {
+        this._benchmarks.set(benchmark, new Results(benchmark));
+    }
+    
+    start(numIterations)
+    {
+        this._triggerCellSaved = this._triggerCell.innerHTML;
+        this._updateIterations();
+        
+        this._summary.reset();
+        for (let [benchmark, results] of this._benchmarks)
+            results.reset();
+        this._isRunning = true;
+        this._numIterations = numIterations;
+        this._iterator = null;
+        this._iterate();
+    }
+    
+    reportResult(...args)
+    {
+        this._benchmarks.get(this._benchmark).reportResult(...args);
+        this._recomputeSummary();
+        this._iterate();
+    }
+    
+    reportError(...args)
+    {
+        this._benchmarks.get(this._benchmark).reportError(...args);
+        this._recomputeSummary();
+        this._iterate();
+    }
+    
+    _recomputeSummary()
+    {
+        class Geomean {
+            constructor()
+            {
+                this._count = 0;
+                this._sum = 0;
+            }
+            
+            add(value)
+            {
+                this._count++;
+                this._sum += Math.log(value);
+            }
+            
+            get result()
+            {
+                return Math.exp(this._sum * (1 / this._count));
+            }
+        }
+        
+        let statses = [];
+        for (let results of this._benchmarks.values()) {
+            for (let subResult of Results.subResults)
+                statses.push(results[subResult]);
+        }
+        
+        let numIterations = Math.min(...statses.map(stats =&gt; stats.numIterations));
+        let data = new Array(numIterations);
+        for (let i = 0; i &lt; data.length; ++i)
+            data[i] = new Geomean();
+        
+        for (let stats of statses) {
+            for (let i = 0; i &lt; data.length; ++i)
+                data[i].add(stats.valueForIteration(i));
+        }
+        
+        let geomeans = data.map(geomean =&gt; geomean.result);
+        
+        this._summary.reset(...geomeans);
+    }
+    
+    _iterate()
+    {
+        this._benchmark = this._iterator ? this._iterator.next().value : null;
+        if (!this._benchmark) {
+            if (!this._numIterations) {
+                this._triggerCell.innerHTML = this._triggerCellSaved;
+                return;
+            }
+            this._numIterations--;
+            this._updateIterations();
+            this._iterator = this._benchmarks.keys();
+            this._benchmark = this._iterator.next().value;
+        }
+        
+        this._benchmarks.get(this._benchmark).reportRunning();
+        
+        window.setTimeout(() =&gt; {
+            if (!this._isRunning)
+                return;
+            
+            this._magicCell.contentDocument.body.textContent = &quot;&quot;;
+            this._magicCell.contentDocument.body.innerHTML = &quot;&lt;iframe id=\&quot;magicFrame\&quot; frameborder=\&quot;0\&quot;&gt;&quot;;
+            
+            let magicFrame = this._magicCell.contentDocument.getElementById(&quot;magicFrame&quot;);
+            magicFrame.contentDocument.open();
+            magicFrame.contentDocument.write(
+                `&lt;!DOCTYPE html&gt;&lt;head&gt;&lt;title&gt;benchmark payload&lt;/title&gt;&lt;/head&gt;&lt;body&gt;&lt;script&gt;` +
+                `window.onerror = top.${this._key}.reportError;\n` +
+                `function reportResult()\n` +
+                `{\n` +
+                `    var driver = top.${this._key};\n` +
+                `    driver.reportResult.apply(driver, arguments);\n` +
+                `}\n` +
+                `&lt;/script&gt;\n` +
+                `${this._benchmark.code}&lt;/body&gt;&lt;/html&gt;`);
+        }, 100);
+    }
+    
+    _updateIterations()
+    {
+        this._triggerCell.innerHTML = &quot;Running... (&quot; + (this._numIterations + 1) + &quot; to go)&quot;;
+    }
+}
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchgluejs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/glue.js (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/glue.js                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/glue.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,34 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. 
+ */
+&quot;use strict&quot;;
+
+const driver = new Driver(
+    document.getElementById(&quot;trigger&quot;),
+    document.getElementById(&quot;magic&quot;),
+    document.getElementById(&quot;Geomean&quot;),
+    &quot;sampleBench&quot;);
+
+driver.addBenchmark(AirBenchmark);
+driver.addBenchmark(BasicBenchmark);
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchindexhtml"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/index.html (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/index.html                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/index.html        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,44 @@
</span><ins>+&lt;html&gt;
+&lt;head&gt;
+&lt;title&gt;ES6 Sample Bench&lt;/title&gt;
+&lt;link rel=&quot;stylesheet&quot; type=&quot;text/css&quot; href=&quot;style.css&quot;&gt;
+&lt;/head&gt;
+&lt;script src=&quot;driver.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;results.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;stats.js&quot;&gt;&lt;/script&gt;
+&lt;body&gt;
+&lt;div id=&quot;contents&quot;&gt;
+&lt;h1&gt;ES6 Sample Bench&lt;/h1&gt;
+&lt;p&gt;This is a benchmark suite that consists of ES6 sample code written by the
+&lt;a href=&quot;http://www.webkit.org/&quot;&gt;WebKit&lt;/a&gt; team.  All results are in milliseconds with 95%
+confidence intervals.  Lower is better.&lt;/p&gt;
+&lt;p id=&quot;trigger&quot;&gt;&lt;a href=&quot;javascript:driver.start(10)&quot;&gt;Start Benchmark&lt;/a&gt;&lt;/p&gt;
+&lt;p&gt;&lt;b&gt;Geometric Mean Result: &lt;span id=&quot;Geomean&quot;&gt;...&lt;/span&gt;&lt;/b&gt;&lt;/p&gt;
+&lt;table cellspacing=0 cellpadding=0 border=0&gt;
+  &lt;tr&gt;
+    &lt;th width=180&gt;Benchmark&lt;/th&gt;
+    &lt;th width=180&gt;First Iteration&lt;/th&gt;
+    &lt;th width=180&gt;Worst 2%&lt;/th&gt;
+    &lt;th width=180&gt;Steady State&lt;/th&gt;
+  &lt;tr&gt;
+    &lt;th&gt;Air&lt;/th&gt;
+    &lt;td id=&quot;AirFirstIteration&quot;&gt;...&lt;/td&gt;
+    &lt;td id=&quot;AirAverageWorstCase&quot;&gt;...&lt;/td&gt;
+    &lt;td id=&quot;AirSteadyState&quot;&gt;...&lt;/td&gt;
+    &lt;td id=&quot;AirMessage&quot;&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+  &lt;tr&gt;
+    &lt;th&gt;Basic&lt;/th&gt;
+    &lt;td id=&quot;BasicFirstIteration&quot;&gt;...&lt;/td&gt;
+    &lt;td id=&quot;BasicAverageWorstCase&quot;&gt;...&lt;/td&gt;
+    &lt;td id=&quot;BasicSteadyState&quot;&gt;...&lt;/td&gt;
+    &lt;td id=&quot;BasicMessage&quot;&gt;&lt;/td&gt;
+  &lt;/tr&gt;
+&lt;/table&gt;
+&lt;/div&gt;
+&lt;iframe id=&quot;magic&quot; frameBorder=0&gt;&lt;/iframe&gt;
+&lt;script src=&quot;air_benchmark.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;basic_benchmark.js&quot;&gt;&lt;/script&gt;
+&lt;script src=&quot;glue.js&quot;&gt;&lt;/script&gt;
+&lt;/body&gt;
+&lt;/html&gt;
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchresultsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/results.js (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/results.js                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/results.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,106 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. 
+ */
+&quot;use strict&quot;;
+
+class Results {
+    constructor(benchmark)
+    {
+        this._benchmark = benchmark;
+        for (let subResult of Results.subResults)
+            this[subResult] = new Stats(benchmark.cells[subResult]);
+    }
+    
+    get benchmark() { return this._benchmark; }
+    
+    reset()
+    {
+        for (let subResult of Results.subResults)
+            this[subResult].reset();
+    }
+    
+    reportRunning()
+    {
+        this._benchmark.cells.message.innerHTML = &quot;Running...&quot;;
+    }
+    
+    reportDone()
+    {
+        this._benchmark.cells.message.innerHTML = &quot;&quot;;
+    }
+    
+    reportResult(times)
+    {
+        function averageAbovePercentile(numbers, percentile) {
+            // Don't change the original array.
+            numbers = numbers.slice();
+            
+            // Sort in ascending order.
+            numbers.sort(function(a, b) { return a - b; });
+            
+            // Now the elements we want are at the end. Keep removing them until the array size shrinks too much.
+            // Examples assuming percentile = 99:
+            //
+            // - numbers.length starts at 100: we will remove just the worst entry and then not remove anymore,
+            //   since then numbers.length / originalLength = 0.99.
+            //
+            // - numbers.length starts at 1000: we will remove the ten worst.
+            //
+            // - numbers.length starts at 10: we will remove just the worst.
+            var numbersWeWant = [];
+            var originalLength = numbers.length;
+            while (numbers.length / originalLength &gt; percentile / 100)
+                numbersWeWant.push(numbers.pop());
+            
+            var sum = 0;
+            for (var i = 0; i &lt; numbersWeWant.length; ++i)
+                sum += numbersWeWant[i];
+            
+            var result = sum / numbersWeWant.length;
+            
+            // Do a sanity check.
+            if (numbers.length &amp;&amp; result &lt; numbers[numbers.length - 1]) {
+                throw &quot;Sanity check fail: the worst case result is &quot; + result +
+                    &quot; but we didn't take into account &quot; + numbers;
+            }
+            
+            return result;
+        }
+
+        this.firstIteration.add(times[0]);
+        let steadyTimes = times.slice(1);
+        this.averageWorstCase.add(averageAbovePercentile(steadyTimes, 98));
+        this.steadyState.add(steadyTimes.reduce((previous, current) =&gt; previous + current));
+        this.reportDone();
+    }
+    
+    reportError(message, url, lineNumber)
+    {
+        for (let subResult of Results.subResults)
+            this[subResult].reportResult(Stats.error);
+        this._benchmark.cells.message.innerHTML = url + &quot;:&quot; + lineNumber + &quot;: &quot; + message;
+    }
+}
+
+Results.subResults = [&quot;firstIteration&quot;, &quot;averageWorstCase&quot;, &quot;steadyState&quot;];
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchstatsjs"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/stats.js (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/stats.js                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/stats.js        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,105 @@
</span><ins>+/*
+ * Copyright (C) 2016 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. 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.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``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 APPLE INC. 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. 
+ */
+&quot;use strict&quot;;
+
+class Stats {
+    constructor(cell)
+    {
+        this._cell = cell;
+        this._data = [];
+    }
+    
+    reset(...data)
+    {
+        this._data = data;
+        this._update();
+    }
+    
+    add(...data)
+    {
+        this._data.push(...data);
+        this._update();
+    }
+    
+    get numIterations() { return this._data.length; }
+    valueForIteration(index) { return this._data[index]; }
+    
+    get result()
+    {
+        var tDistribution = [NaN, NaN, 12.71, 4.30, 3.18, 2.78, 2.57, 2.45, 2.36, 2.31, 2.26, 2.23, 2.20, 2.18, 2.16, 2.14, 2.13, 2.12, 2.11, 2.10, 2.09, 2.09, 2.08, 2.07, 2.07, 2.06, 2.06, 2.06, 2.05, 2.05, 2.05, 2.04, 2.04, 2.04, 2.03, 2.03, 2.03, 2.03, 2.03, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.02, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.01, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 2.00, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.99, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1.98, 1
 .97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 
 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.97, 1.96];
+        var tMax = tDistribution.length;
+        var tLimit = 1.96;
+
+        function tDist(n)
+        {
+            if (n &gt; tMax)
+                return tLimit;
+            return tDistribution[n];
+        }
+        
+        let sum = 0;
+        let n = 0;
+        for (let datum of this._data) {
+            sum += datum;
+            n++;
+        }
+        
+        let mean = sum / n;
+        
+        if (n &lt;= 2)
+            return {n, mean};
+        
+        let sumForStdDev = 0;
+        for (let datum of this._data)
+            sumForStdDev += Math.pow(datum - mean, 2);
+        let standardDeviation = Math.sqrt(sumForStdDev / (n - 1));
+        let standardError = standardDeviation / Math.sqrt(n);
+        let interval = tDist(n) * standardError;
+        return {n, mean, interval};
+    }
+    
+    toString()
+    {
+        let result = this.result;
+        
+        if (!result.n)
+            return &quot;...&quot;;
+        
+        if (result.mean != result.mean)
+            return &quot;ERROR&quot;;
+        
+        if (&quot;interval&quot; in result)
+            return `${result.mean.toFixed(2)} ms &amp;plusmn; ${result.interval.toFixed(2)} ms`;
+
+        return `${result.mean.toFixed(2)} ms`;
+    }
+    
+    _update()
+    {
+        if (this._cell)
+            this._cell.innerHTML = this.toString();
+    }
+}
+
</ins></span></pre></div>
<a id="trunkPerformanceTestsES6SampleBenchstylecss"></a>
<div class="addfile"><h4>Added: trunk/PerformanceTests/ES6SampleBench/style.css (0 => 202613)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ES6SampleBench/style.css                                (rev 0)
+++ trunk/PerformanceTests/ES6SampleBench/style.css        2016-06-29 05:55:37 UTC (rev 202613)
</span><span class="lines">@@ -0,0 +1,142 @@
</span><ins>+body {
+    background: #fff;
+    color: #000;
+    margin: 10px;
+    padding: 0;
+}
+body, th, tr {
+    font: normal 13px Verdana,Arial,'Bitstream Vera Sans',Helvetica,sans-serif;
+}
+h1, h2, h3, h4 {
+    font-family: Arial,Verdana,'Bitstream Vera Sans',Helvetica,sans-serif;
+    font-weight: bold;
+    letter-spacing: -0.018em;
+    page-break-after: avoid;
+}
+h1 { font-size: 20px; text-indent: -10px }
+h2 { font-size: 17px; text-indent: -10px }
+h3 { font-size: 15px; text-indent: -10px }
+hr { border: none;  border-top: 1px solid #ccb; margin: 2em 0 }
+address { font-style: normal }
+img { border: none }
+
+.underline { text-decoration: underline }
+ol.loweralpha { list-style-type: lower-alpha }
+ol.upperalpha { list-style-type: upper-alpha }
+ol.lowerroman { list-style-type: lower-roman }
+ol.upperroman { list-style-type: upper-roman }
+ol.arabic { list-style-type: decimal }
+
+.banner-link:link, .banner-link:visited {
+    text-decoration: none;
+    color: #b00;
+    border-bottom: 0px;
+}
+
+/* Link styles */
+:link, :visited {
+    text-decoration: none;
+    color: #b00;
+    border-bottom: 1px dotted #bbb;
+}
+h1 :link, h1 :visited ,h2 :link, h2 :visited, h3 :link, h3 :visited,
+h4 :link, h4 :visited, h5 :link, h5 :visited, h6 :link, h6 :visited {
+    color: inherit;
+}
+
+/* Heading anchors */
+.anchor:link, .anchor:visited {
+    border: none;
+    color: #d7d7d7;
+    font-size: .8em;
+    vertical-align: text-top;
+}
+* &gt; .anchor:link, * &gt; .anchor:visited {
+    visibility: hidden;
+}
+h1:hover .anchor, h2:hover .anchor, h3:hover .anchor,
+h4:hover .anchor, h5:hover .anchor, h6:hover .anchor,
+span:hover .anchor {
+    visibility: visible;
+}
+
+a.missing:link, a.missing:visited, a.missing, span.missing,
+a.forbidden, span.forbidden { color: #998 }
+a.missing:hover { color: #000 }
+a.closed:link, a.closed:visited, span.closed { text-decoration: line-through }
+
+pre {
+    background: #f7f7f7;
+    border: 1px solid #d7d7d7;
+    margin: 1em 1.75em;
+    padding: .25em;
+    overflow: auto;
+}
+
+div.code {
+    background: #f7f7f7;
+    border: 1px solid #d7d7d7;
+    margin: 1em 1.75em;
+    padding: .25em;
+    overflow: auto
+}
+
+div.code pre { margin: 0; }
+
+dt {
+    font-weight: bold;
+}
+dd {
+    padding: 0 0 0.8em 0;
+}
+dd:last-child {
+    padding: 0 0 0 0;
+}
+
+/** Logo **/
+.site-logo {
+    font-size: 3rem;
+    line-height: 3rem;
+    font-weight: 200;
+    display: inline-block;
+    background: url('../../wp-content/themes/webkit/images/webkit.svg') no-repeat;
+    padding-left: 7rem;
+    color: #333;
+}
+
+.site-logo .tagline {
+    display: block;
+    font-size: 1.2rem;
+    line-height: 2rem;
+    letter-spacing: -0.05rem;
+    color: #666;
+}
+
+table {
+    padding: 0 0 0 0;
+}
+
+#contents {
+    font-size: 90%;
+    padding: 1em 2em 2em 2em
+}
+
+p {
+    margin: 0 0 1em 0;
+}
+
+p:last-child {
+    margin: 0 0 0 0;
+}
+
+th {
+    font-size: 90%;
+    font-weight: bold;   
+    padding: 0 0 1em 0;
+}
+
+td {
+    font-size: 90%;
+    text-align: center;
+    padding: 0 0 1em 0;
+}
</ins></span></pre>
</div>
</div>

</body>
</html>