<!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>[196225] 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/196225">196225</a></dd>
<dt>Author</dt> <dd>jonlee@apple.com</dd>
<dt>Date</dt> <dd>2016-02-06 15:36:27 -0800 (Sat, 06 Feb 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>Minor improvements to debug harness.

* Animometer/developer.html:
* Animometer/resources/debug-runner/animometer.css:
(#suites): Put the complexity text boxes closer to the test names.
(#options):
(#rawFPS circle): Make the interval FPS appear as a separate data series, with a line.
(#intervalFPS path):
(#intervalFPS circle):
* Animometer/resources/debug-runner/animometer.js:
(window.optionsManager.updateLocalStorageFromUI): Convert number inputs from text.
(window.suitesManager._onChangeTestCheckbox): Refactor to take a checkbox.
(window.suitesManager._createTestElement): Enhance such that typing into the complexity
input will automatically select that test for running.
(window.suitesManager.updateLocalStorageFromJSON): Make the harness work for private
browsing.
* Animometer/resources/debug-runner/graph.js: Separate the intervalFPS data, and show
more accuracy in timestamps.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkPerformanceTestsAnimometerdeveloperhtml">trunk/PerformanceTests/Animometer/developer.html</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunneranimometercss">trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.css</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunneranimometerjs">trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js</a></li>
<li><a href="#trunkPerformanceTestsAnimometerresourcesdebugrunnergraphjs">trunk/PerformanceTests/Animometer/resources/debug-runner/graph.js</a></li>
<li><a href="#trunkPerformanceTestsChangeLog">trunk/PerformanceTests/ChangeLog</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkPerformanceTestsAnimometerdeveloperhtml"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/developer.html (196224 => 196225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/developer.html        2016-02-06 23:31:51 UTC (rev 196224)
+++ trunk/PerformanceTests/Animometer/developer.html        2016-02-06 23:36:27 UTC (rev 196225)
</span><span class="lines">@@ -1,6 +1,7 @@
</span><span class="cx"> &lt;!DOCTYPE html&gt;
</span><span class="cx"> &lt;html&gt;
</span><span class="cx"> &lt;head&gt;
</span><ins>+    &lt;title&gt;Animometer - developer&lt;/title&gt;
</ins><span class="cx">     &lt;meta name=&quot;viewport&quot; content=&quot;width=device-width, user-scalable=no&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;resources/runner/animometer.css&quot;&gt;
</span><span class="cx">     &lt;link rel=&quot;stylesheet&quot; href=&quot;resources/debug-runner/animometer.css&quot;&gt;
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunneranimometercss"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.css (196224 => 196225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.css        2016-02-06 23:31:51 UTC (rev 196224)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.css        2016-02-06 23:36:27 UTC (rev 196225)
</span><span class="lines">@@ -143,12 +143,12 @@
</span><span class="cx"> 
</span><span class="cx"> #suites {
</span><span class="cx">     padding-left: 15vw;
</span><del>-    padding-right: 2em;
-    flex: 0 1 40%;
</del><ins>+    padding-right: 3em;
+    flex: 1 1 30%;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #options {
</span><del>-    flex: 1 1 auto;
</del><ins>+    flex: 10 1 auto;
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> #intro input[type=&quot;number&quot;] {
</span><span class="lines">@@ -454,7 +454,15 @@
</span><span class="cx">     stroke-width: 1px;
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-#rawFPS circle,
-#intervalFPS circle {
</del><ins>+#rawFPS circle {
</ins><span class="cx">     fill: rgb(250, 73, 37);
</span><span class="cx"> }
</span><ins>+
+#intervalFPS path {
+    stroke: hsla(30, 96%, 56%, .7);
+    stroke-width: 1px;
+}
+
+#intervalFPS circle {
+    fill: hsl(30, 96%, 56%);
+}
</ins></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunneranimometerjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js (196224 => 196225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js        2016-02-06 23:31:51 UTC (rev 196224)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/animometer.js        2016-02-06 23:36:27 UTC (rev 196225)
</span><span class="lines">@@ -70,7 +70,7 @@
</span><span class="cx">             var type = formElement.type;
</span><span class="cx"> 
</span><span class="cx">             if (type == &quot;number&quot;)
</span><del>-                options[name] = formElement.value;
</del><ins>+                options[name] = +formElement.value;
</ins><span class="cx">             else if (type == &quot;checkbox&quot;)
</span><span class="cx">                 options[name] = formElement.checked;
</span><span class="cx">             else if (type == &quot;radio&quot;)
</span><span class="lines">@@ -157,9 +157,8 @@
</span><span class="cx">         this._updateStartButtonState();
</span><span class="cx">     },
</span><span class="cx"> 
</span><del>-    _onChangeTestCheckbox: function(event)
</del><ins>+    _onChangeTestCheckbox: function(suiteCheckbox)
</ins><span class="cx">     {
</span><del>-        var suiteCheckbox = event.target.suiteCheckbox;
</del><span class="cx">         this._updateSuiteCheckboxState(suiteCheckbox);
</span><span class="cx">         this._updateStartButtonState();
</span><span class="cx">     },
</span><span class="lines">@@ -186,12 +185,20 @@
</span><span class="cx"> 
</span><span class="cx">         var testCheckbox = DocumentExtension.createElement(&quot;input&quot;, { type: &quot;checkbox&quot; }, span);
</span><span class="cx">         testCheckbox.test = test;
</span><del>-        testCheckbox.onchange = this._onChangeTestCheckbox.bind(this);
</del><ins>+        testCheckbox.onchange = function(event) {
+            this._onChangeTestCheckbox(event.target.suiteCheckbox);
+        }.bind(this);
</ins><span class="cx">         testCheckbox.suiteCheckbox = suiteCheckbox;
</span><span class="cx"> 
</span><span class="cx">         suiteCheckbox.testsElements.push(testElement);
</span><span class="cx">         span.appendChild(document.createTextNode(&quot; &quot; + test.name));
</span><del>-        DocumentExtension.createElement(&quot;input&quot;, { type: &quot;number&quot; }, testElement);
</del><ins>+        var complexity = DocumentExtension.createElement(&quot;input&quot;, { type: &quot;number&quot; }, testElement);
+        complexity.relatedCheckbox = testCheckbox;
+        complexity.oninput = function(event) {
+            var relatedCheckbox = event.target.relatedCheckbox;
+            relatedCheckbox.checked = true;
+            this._onChangeTestCheckbox(relatedCheckbox.suiteCheckbox);
+        }.bind(this);
</ins><span class="cx">         return testElement;
</span><span class="cx">     },
</span><span class="cx"> 
</span><span class="lines">@@ -303,7 +310,9 @@
</span><span class="cx">                 var complexity = Math.round(data[Strings.json.measurements.average]);
</span><span class="cx"> 
</span><span class="cx">                 var value = { checked: true, complexity: complexity };
</span><del>-                localStorage.setItem(this._localStorageNameForTest(suiteName, testName), JSON.stringify(value));
</del><ins>+                try {
+                    localStorage.setItem(this._localStorageNameForTest(suiteName, testName), JSON.stringify(value));
+                } catch (e) {}
</ins><span class="cx">             }
</span><span class="cx">         }
</span><span class="cx">     }
</span></span></pre></div>
<a id="trunkPerformanceTestsAnimometerresourcesdebugrunnergraphjs"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/Animometer/resources/debug-runner/graph.js (196224 => 196225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/Animometer/resources/debug-runner/graph.js        2016-02-06 23:31:51 UTC (rev 196224)
+++ trunk/PerformanceTests/Animometer/resources/debug-runner/graph.js        2016-02-06 23:36:27 UTC (rev 196225)
</span><span class="lines">@@ -127,6 +127,9 @@
</span><span class="cx">         var filteredData = graphData.samples.filter(function (sample) {
</span><span class="cx">             return &quot;smoothedFPS&quot; in sample;
</span><span class="cx">         });
</span><ins>+        var intervalData = graphData.samples.filter(function (sample) {
+            return &quot;intervalFPS&quot; in sample;
+        });
</ins><span class="cx"> 
</span><span class="cx">         function addData(name, data, yCoordinateCallback, pointRadius, omitLine) {
</span><span class="cx">             var svgGroup = svg.append(&quot;g&quot;).attr(&quot;id&quot;, name);
</span><span class="lines">@@ -153,7 +156,7 @@
</span><span class="cx">         addData(&quot;complexity&quot;, allData, function(d) { return yLeft(d.complexity); }, 2);
</span><span class="cx">         addData(&quot;rawFPS&quot;, allData, function(d) { return yRight(d.fps); }, 1);
</span><span class="cx">         addData(&quot;filteredFPS&quot;, filteredData, function(d) { return yRight(d.smoothedFPS); }, 2);
</span><del>-        addData(&quot;intervalFPS&quot;, filteredData, function(d) { return yRight(d.intervalFPS); }, 3, true);
</del><ins>+        addData(&quot;intervalFPS&quot;, intervalData, function(d) { return yRight(d.intervalFPS); }, 2);
</ins><span class="cx"> 
</span><span class="cx">         // Area to handle mouse events
</span><span class="cx">         var area = svg.append(&quot;rect&quot;)
</span><span class="lines">@@ -186,7 +189,7 @@
</span><span class="cx">                 .attr(&quot;x2&quot;, cursor_x)
</span><span class="cx">                 .attr(&quot;y2&quot;, yRight(cursor_y));
</span><span class="cx"> 
</span><del>-            document.querySelector(&quot;#test-graph nav .time&quot;).textContent = data.time.toFixed(3) + &quot;s (&quot; + index + &quot;)&quot;;
</del><ins>+            document.querySelector(&quot;#test-graph nav .time&quot;).textContent = data.time.toFixed(4) + &quot;s (&quot; + index + &quot;)&quot;;
</ins><span class="cx">             statsToHighlight.forEach(function(name) {
</span><span class="cx">                 var element = document.querySelector(&quot;#test-graph nav .&quot; + name);
</span><span class="cx">                 var content = &quot;&quot;;
</span></span></pre></div>
<a id="trunkPerformanceTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/PerformanceTests/ChangeLog (196224 => 196225)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/PerformanceTests/ChangeLog        2016-02-06 23:31:51 UTC (rev 196224)
+++ trunk/PerformanceTests/ChangeLog        2016-02-06 23:36:27 UTC (rev 196225)
</span><span class="lines">@@ -1,5 +1,26 @@
</span><span class="cx"> 2016-02-06  Jon Lee  &lt;jonlee@apple.com&gt;
</span><span class="cx"> 
</span><ins>+        Minor improvements to debug harness.
+
+        * Animometer/developer.html:
+        * Animometer/resources/debug-runner/animometer.css:
+        (#suites): Put the complexity text boxes closer to the test names.
+        (#options):
+        (#rawFPS circle): Make the interval FPS appear as a separate data series, with a line.
+        (#intervalFPS path):
+        (#intervalFPS circle):
+        * Animometer/resources/debug-runner/animometer.js:
+        (window.optionsManager.updateLocalStorageFromUI): Convert number inputs from text.
+        (window.suitesManager._onChangeTestCheckbox): Refactor to take a checkbox.
+        (window.suitesManager._createTestElement): Enhance such that typing into the complexity
+        input will automatically select that test for running.
+        (window.suitesManager.updateLocalStorageFromJSON): Make the harness work for private
+        browsing.
+        * Animometer/resources/debug-runner/graph.js: Separate the intervalFPS data, and show
+        more accuracy in timestamps.
+
+2016-02-06  Jon Lee  &lt;jonlee@apple.com&gt;
+
</ins><span class="cx">         Refactor helper methods for getting random values for a stage.
</span><span class="cx"> 
</span><span class="cx">         Instead of requiring a Stage instance, just attach it to the Stage object.
</span></span></pre>
</div>
</div>

</body>
</html>