<!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>[197719] trunk/Tools</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/197719">197719</a></dd>
<dt>Author</dt> <dd>jonlee@apple.com</dd>
<dt>Date</dt> <dd>2016-03-07 17:51:27 -0800 (Mon, 07 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Update perf bot configuration for Animometer
https://bugs.webkit.org/show_bug.cgi?id=155134

Reviewed by Ryosuke Niwa.

* Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Refactor the patch
to work with the latest version of the harness.
* Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan: Bump up the timeout,
and use the latest version of the harness.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkToolsChangeLog">trunk/Tools/ChangeLog</a></li>
<li><a href="#trunkToolsScriptswebkitpybenchmark_runnerdatapatchesAnimometerpatch">trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch</a></li>
<li><a href="#trunkToolsScriptswebkitpybenchmark_runnerdataplansanimometerplan">trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkToolsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Tools/ChangeLog (197718 => 197719)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/ChangeLog        2016-03-08 01:23:07 UTC (rev 197718)
+++ trunk/Tools/ChangeLog        2016-03-08 01:51:27 UTC (rev 197719)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-03-07  Jon Lee  &lt;jonlee@apple.com&gt;
+
+        Update perf bot configuration for Animometer
+        https://bugs.webkit.org/show_bug.cgi?id=155134
+
+        Reviewed by Ryosuke Niwa.
+
+        * Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch: Refactor the patch
+        to work with the latest version of the harness.
+        * Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan: Bump up the timeout,
+        and use the latest version of the harness.
+
</ins><span class="cx"> 2016-03-07  Joanmarie Diggs  &lt;jdiggs@igalia.com&gt;
</span><span class="cx"> 
</span><span class="cx">         [GTK][jhbuild] OpenWebRTC build fails with GCC 6.0
</span></span></pre></div>
<a id="trunkToolsScriptswebkitpybenchmark_runnerdatapatchesAnimometerpatch"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch (197718 => 197719)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch        2016-03-08 01:23:07 UTC (rev 197718)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/patches/Animometer.patch        2016-03-08 01:51:27 UTC (rev 197719)
</span><span class="lines">@@ -1,11 +1,13 @@
</span><del>-diff --git a/runner/resources/animometer.js b/runner/resources/animometer.js
-index d3ac8db..230ac05 100644
---- a/runner/resources/animometer.js
-+++ b/runner/resources/animometer.js
-@@ -41,14 +41,62 @@ window.benchmarkRunnerClient = {
-         this._resultsDashboard.push(suitesSamplers);
-     },
-     
</del><ins>+diff --git a/PerformanceTests/Animometer/resources/debug-runner/animometer.js b/PerformanceTests/Animometer/resources/debug-runner/animometer.js
+index ffc71ba..02a5d49 100644
+--- a/resources/debug-runner/animometer.js
++++ b/resources/debug-runner/animometer.js
+@@ -119,6 +119,57 @@ Utilities.extendObject(window.benchmarkRunnerClient, {
+     {
+         this.progressBar.incrementRange();
+         this.results.calculateScore(testData);
++    },
++
</ins><span class="cx"> +    _computeTestReport: function(testName, testResults)
</span><span class="cx"> +    {
</span><span class="cx"> +        return [testResults[Strings.json.score]];
</span><span class="lines">@@ -14,51 +16,39 @@
</span><span class="cx"> +    _computeSuiteReports: function(suiteName, suiteResults)
</span><span class="cx"> +    {
</span><span class="cx"> +        var testsReports = {};
</span><del>-+
-+        for (var testName in suiteResults[Strings.json.results.tests]) {
-+            var testReports = this._computeTestReport(testName, suiteResults[Strings.json.results.tests][testName]);
</del><ins>++        for (var testName in suiteResults) {
++            var testReports = this._computeTestReport(testName, suiteResults[testName]);
</ins><span class="cx"> +            testsReports[testName] = { &quot;metrics&quot;: { &quot;Score&quot;: { &quot;current&quot;: testReports } } };
</span><span class="cx"> +        }
</span><del>-+
</del><span class="cx"> +        return testsReports;
</span><span class="cx"> +    },
</span><span class="cx"> +
</span><span class="cx"> +    _computeIterationReports: function(iterationResults)
</span><span class="cx"> +    {
</span><span class="cx"> +        var suitesReports = {};
</span><del>-+
-+        for (var suiteName in iterationResults[Strings.json.results.suites]) {
-+            var testsReports = this._computeSuiteReports(suiteName, iterationResults[Strings.json.results.suites][suiteName]);
</del><ins>++        for (var suiteName in iterationResults[Strings.json.results.tests]) {
++            var testsReports = this._computeSuiteReports(suiteName, iterationResults[Strings.json.results.tests][suiteName]);
</ins><span class="cx"> +            suitesReports[suiteName] = { &quot;metrics&quot;: { &quot;Score&quot;: [&quot;Geometric&quot;] }, &quot;tests&quot;: testsReports };
</span><span class="cx"> +        }
</span><del>-+
</del><span class="cx"> +        return suitesReports;
</span><span class="cx"> +    },
</span><span class="cx"> +
</span><span class="cx"> +    _computeResultsReports: function()
</span><span class="cx"> +    {
</span><del>-+        var json = this._resultsDashboard.toJSON(false, false);
-+        var iterationReports = this._computeIterationReports(json[Strings.json.results.iterations][0])
</del><ins>++        var results = this.results.results[0];
++        var iterationReports = this._computeIterationReports(results);
</ins><span class="cx"> +        return {&quot;Animometer&quot;: {&quot;metrics&quot; : {&quot;Score&quot; : [&quot;Geometric&quot;]}, &quot;tests&quot; : iterationReports } };
</span><span class="cx"> +    },
</span><span class="cx"> +
</span><del>-     didFinishLastIteration: function ()
-     {
--        var json = this._resultsDashboard.toJSON(true, true);
--        this.score = json[Strings.json.score];
--        this._resultsTable.showIterations(json[Strings.json.results.iterations], this.options);
--        sectionsManager.showJSON(&quot;json&quot;, json[Strings.json.results.iterations][0]);
--        suitesManager.updateLocalStorageFromJSON(json[Strings.json.results.iterations][0]);
--        benchmarkController.showResults();
</del><ins>++    didFinishLastIteration: function()
++    {
</ins><span class="cx"> +        // submit result to server
</span><span class="cx"> +        var results = JSON.stringify(this._computeResultsReports());
</span><span class="cx"> +        var xhr = new XMLHttpRequest();
</span><span class="cx"> +        xhr.open(&quot;POST&quot;, &quot;/report&quot;);
</span><del>-+
</del><span class="cx"> +        xhr.setRequestHeader(&quot;Content-type&quot;, &quot;application/json&quot;);
</span><span class="cx"> +        xhr.setRequestHeader(&quot;Content-length&quot;, results.length);
</span><span class="cx"> +        xhr.setRequestHeader(&quot;Connection&quot;, &quot;close&quot;);
</span><del>-+
</del><span class="cx"> +        xhr.onreadystatechange = function() {
</span><span class="cx"> +            if (xhr.readyState == XMLHttpRequest.DONE &amp;&amp; xhr.status == 200) {
</span><span class="cx"> +                closeRequest = new XMLHttpRequest();
</span><span class="lines">@@ -66,43 +56,101 @@
</span><span class="cx"> +                closeRequest.send()
</span><span class="cx"> +            }
</span><span class="cx"> +        }
</span><del>-+
</del><span class="cx"> +        xhr.send(results);
</span><span class="cx">      }
</span><del>- }

-@@ -287,7 +335,13 @@ window.suitesManager =

-             suite.tests.forEach(function(test) {
-                 var testElement = this._createTestElement(listElement, test, suiteCheckbox);
-+                if (index &lt; 4) {
-+                    var testCheckbox = this._checkboxElement(testElement);
-+                    testCheckbox.checked = true;
-+                }
-             }, this);
-+            
-+            this._updateSuiteCheckboxState(suiteCheckbox);
</del><ins>+ });
+
+@@ -255,10 +307,10 @@ window.suitesManager =
+         startButton.disabled = true;
+     },
+
+-    _onChangeSuiteCheckbox: function(event)
++    _onChangeSuiteCheckbox: function(suiteCheckbox)
+     {
+-        var selected = event.target.checked;
+-        event.target.testsElements.forEach(function(testElement) {
++        var selected = suiteCheckbox.checked;
++        suiteCheckbox.testsElements.forEach(function(testElement) {
+             var testCheckbox = this._checkboxElement(testElement);
+             testCheckbox.checked = selected;
</ins><span class="cx">          }, this);
</span><del>-     },
-     
-@@ -387,10 +441,8 @@ window.benchmarkController =
- {
</del><ins>+@@ -279,7 +331,9 @@ window.suitesManager =
+
+         var suiteCheckbox = Utilities.createElement(&quot;input&quot;, { type: &quot;checkbox&quot; }, label);
+         suiteCheckbox.suite = suite;
+-        suiteCheckbox.onchange = this._onChangeSuiteCheckbox.bind(this);
++        suiteCheckbox.onchange = function(event) {
++            this._onChangeSuiteCheckbox(event.target);
++        }.bind(this);
+         suiteCheckbox.testsElements = [];
+
+         label.appendChild(document.createTextNode(&quot; &quot; + suite.name));
+@@ -428,45 +482,8 @@ window.suitesManager =
+ Utilities.extendObject(window.benchmarkController, {
</ins><span class="cx">      initialize: function()
</span><span class="cx">      {
</span><ins>+-        document.forms[&quot;benchmark-options&quot;].addEventListener(&quot;change&quot;, benchmarkController.onBenchmarkOptionsChanged, true);
+-        document.forms[&quot;graph-type&quot;].addEventListener(&quot;change&quot;, benchmarkController.onGraphTypeChanged, true);
+-        document.forms[&quot;time-graph-options&quot;].addEventListener(&quot;change&quot;, benchmarkController.onTimeGraphOptionsChanged, true);
+-        document.forms[&quot;complexity-graph-options&quot;].addEventListener(&quot;change&quot;, benchmarkController.onComplexityGraphOptionsChanged, true);
</ins><span class="cx"> -        optionsManager.updateUIFromLocalStorage();
</span><span class="cx">          suitesManager.createElements();
</span><span class="cx"> -        suitesManager.updateUIFromLocalStorage();
</span><ins>+-        suitesManager.updateDisplay();
</ins><span class="cx"> -        suitesManager.updateEditsElementsState();
</span><del>-+        setTimeout(benchmarkController.startTest, 3000);
</del><ins>+-
+-        var dropTarget = document.getElementById(&quot;drop-target&quot;);
+-        function stopEvent(e) {
+-            e.stopPropagation();
+-            e.preventDefault();
+-        }
+-        dropTarget.addEventListener(&quot;dragenter&quot;, stopEvent, false);
+-        dropTarget.addEventListener(&quot;dragover&quot;, stopEvent, false);
+-        dropTarget.addEventListener(&quot;dragleave&quot;, stopEvent, false);
+-        dropTarget.addEventListener(&quot;drop&quot;, function (e) {
+-            e.stopPropagation();
+-            e.preventDefault();
+-
+-            if (!e.dataTransfer.files.length)
+-                return;
+-
+-            var file = e.dataTransfer.files[0];
+-
+-            var reader = new FileReader();
+-            reader.filename = file.name;
+-            reader.onload = function(e) {
+-                var run = JSON.parse(e.target.result);
+-                benchmarkRunnerClient.results = new ResultsDashboard(run.options, run.data);
+-                benchmarkController.showResults();
+-            };
+-
+-            reader.readAsText(file);
+-            document.title = &quot;File: &quot; + reader.filename;
+-        }, false);
+-
++        setTimeout(benchmarkController.startBenchmark.bind(benchmarkController), 3000);
</ins><span class="cx">      },
</span><del>- 
-     onChangeAdaptiveTestCheckbox: function()
-@@ -411,7 +463,7 @@ window.benchmarkController =
-         var options = optionsManager.updateLocalStorageFromUI();
</del><ins>+
+     onBenchmarkOptionsChanged: function(event)
+@@ -482,7 +499,20 @@ Utilities.extendObject(window.benchmarkController, {
+
+     startBenchmark: function()
+     {
+-        var options = optionsManager.updateLocalStorageFromUI();
++        var options = {
++            &quot;test-interval&quot;: 20,
++            &quot;display&quot;: &quot;minimal&quot;,
++            &quot;controller&quot;: &quot;ramp&quot;,
++            &quot;kalman-process-error&quot;: 1,
++            &quot;kalman-measurement-error&quot;: 4,
++            &quot;time-measurement&quot;: &quot;performance&quot;
++        };
++
++        for (var suiteIndex = 0; suiteIndex &lt; 5; ++suiteIndex) {
++            var suiteCheckbox = document.querySelector(&quot;label[for=suite-&quot; + suiteIndex + &quot;] input[type=checkbox]&quot;);
++            suiteCheckbox.checked = true;
++            suitesManager._onChangeSuiteCheckbox(suiteCheckbox);
++        }
</ins><span class="cx">          var suites = suitesManager.updateLocalStorageFromUI();
</span><del>-         sectionsManager.setupRunningSectionStyle(options);
--        this._runBenchmark(suites, options);
-+        benchmarkController._runBenchmark(suites, options);
-         sectionsManager.showSection(&quot;running&quot;);
</del><ins>+         this._startBenchmark(suites, options, &quot;running-test&quot;);
</ins><span class="cx">      },
</span><del>-     
</del></span></pre></div>
<a id="trunkToolsScriptswebkitpybenchmark_runnerdataplansanimometerplan"></a>
<div class="modfile"><h4>Modified: trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan (197718 => 197719)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan        2016-03-08 01:23:07 UTC (rev 197718)
+++ trunk/Tools/Scripts/webkitpy/benchmark_runner/data/plans/animometer.plan        2016-03-08 01:51:27 UTC (rev 197719)
</span><span class="lines">@@ -1,8 +1,8 @@
</span><span class="cx"> {
</span><del>-    &quot;timeout&quot;: 600,
</del><ins>+    &quot;timeout&quot;: 1500,
</ins><span class="cx">     &quot;count&quot;: 1,
</span><del>-    &quot;svn_source&quot;: &quot;https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/Animometer/@r192669&quot;,
</del><ins>+    &quot;svn_source&quot;: &quot;https://svn.webkit.org/repository/webkit/trunk/PerformanceTests/Animometer/@r197652&quot;,
</ins><span class="cx">     &quot;benchmark_patch&quot;: &quot;data/patches/Animometer.patch&quot;,
</span><del>-    &quot;entry_point&quot;: &quot;runner/animometer.html&quot;,
</del><ins>+    &quot;entry_point&quot;: &quot;developer.html&quot;,
</ins><span class="cx">     &quot;output_file&quot;: &quot;animometer.result&quot;
</span><span class="cx"> }
</span><span class="cx">\ No newline at end of file
</span></span></pre>
</div>
</div>

</body>
</html>