Minor improvements to debug harness.
authorjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Feb 2016 23:36:27 +0000 (23:36 +0000)
committerjonlee@apple.com <jonlee@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 6 Feb 2016 23:36:27 +0000 (23:36 +0000)
* 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.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@196225 268f45cc-cd09-0410-ab3c-d52691b4dbfc

PerformanceTests/Animometer/developer.html
PerformanceTests/Animometer/resources/debug-runner/animometer.css
PerformanceTests/Animometer/resources/debug-runner/animometer.js
PerformanceTests/Animometer/resources/debug-runner/graph.js
PerformanceTests/ChangeLog

index d1b4581..8725346 100644 (file)
@@ -1,6 +1,7 @@
 <!DOCTYPE html>
 <html>
 <head>
+    <title>Animometer - developer</title>
     <meta name="viewport" content="width=device-width, user-scalable=no">
     <link rel="stylesheet" href="resources/runner/animometer.css">
     <link rel="stylesheet" href="resources/debug-runner/animometer.css">
index be05487..b5470ed 100644 (file)
@@ -143,12 +143,12 @@ label.tree-label {
 
 #suites {
     padding-left: 15vw;
-    padding-right: 2em;
-    flex: 0 1 40%;
+    padding-right: 3em;
+    flex: 1 1 30%;
 }
 
 #options {
-    flex: 1 1 auto;
+    flex: 10 1 auto;
 }
 
 #intro input[type="number"] {
@@ -454,7 +454,15 @@ label.tree-label {
     stroke-width: 1px;
 }
 
-#rawFPS circle,
-#intervalFPS circle {
+#rawFPS circle {
     fill: rgb(250, 73, 37);
 }
+
+#intervalFPS path {
+    stroke: hsla(30, 96%, 56%, .7);
+    stroke-width: 1px;
+}
+
+#intervalFPS circle {
+    fill: hsl(30, 96%, 56%);
+}
index 95e18e0..0e80cd3 100644 (file)
@@ -70,7 +70,7 @@ window.optionsManager =
             var type = formElement.type;
 
             if (type == "number")
-                options[name] = formElement.value;
+                options[name] = +formElement.value;
             else if (type == "checkbox")
                 options[name] = formElement.checked;
             else if (type == "radio")
@@ -157,9 +157,8 @@ window.suitesManager =
         this._updateStartButtonState();
     },
 
-    _onChangeTestCheckbox: function(event)
+    _onChangeTestCheckbox: function(suiteCheckbox)
     {
-        var suiteCheckbox = event.target.suiteCheckbox;
         this._updateSuiteCheckboxState(suiteCheckbox);
         this._updateStartButtonState();
     },
@@ -186,12 +185,20 @@ window.suitesManager =
 
         var testCheckbox = DocumentExtension.createElement("input", { type: "checkbox" }, span);
         testCheckbox.test = test;
-        testCheckbox.onchange = this._onChangeTestCheckbox.bind(this);
+        testCheckbox.onchange = function(event) {
+            this._onChangeTestCheckbox(event.target.suiteCheckbox);
+        }.bind(this);
         testCheckbox.suiteCheckbox = suiteCheckbox;
 
         suiteCheckbox.testsElements.push(testElement);
         span.appendChild(document.createTextNode(" " + test.name));
-        DocumentExtension.createElement("input", { type: "number" }, testElement);
+        var complexity = DocumentExtension.createElement("input", { type: "number" }, testElement);
+        complexity.relatedCheckbox = testCheckbox;
+        complexity.oninput = function(event) {
+            var relatedCheckbox = event.target.relatedCheckbox;
+            relatedCheckbox.checked = true;
+            this._onChangeTestCheckbox(relatedCheckbox.suiteCheckbox);
+        }.bind(this);
         return testElement;
     },
 
@@ -303,7 +310,9 @@ window.suitesManager =
                 var complexity = Math.round(data[Strings.json.measurements.average]);
 
                 var value = { checked: true, complexity: complexity };
-                localStorage.setItem(this._localStorageNameForTest(suiteName, testName), JSON.stringify(value));
+                try {
+                    localStorage.setItem(this._localStorageNameForTest(suiteName, testName), JSON.stringify(value));
+                } catch (e) {}
             }
         }
     }
index dac213a..4077593 100644 (file)
@@ -127,6 +127,9 @@ Utilities.extendObject(window.benchmarkController, {
         var filteredData = graphData.samples.filter(function (sample) {
             return "smoothedFPS" in sample;
         });
+        var intervalData = graphData.samples.filter(function (sample) {
+            return "intervalFPS" in sample;
+        });
 
         function addData(name, data, yCoordinateCallback, pointRadius, omitLine) {
             var svgGroup = svg.append("g").attr("id", name);
@@ -153,7 +156,7 @@ Utilities.extendObject(window.benchmarkController, {
         addData("complexity", allData, function(d) { return yLeft(d.complexity); }, 2);
         addData("rawFPS", allData, function(d) { return yRight(d.fps); }, 1);
         addData("filteredFPS", filteredData, function(d) { return yRight(d.smoothedFPS); }, 2);
-        addData("intervalFPS", filteredData, function(d) { return yRight(d.intervalFPS); }, 3, true);
+        addData("intervalFPS", intervalData, function(d) { return yRight(d.intervalFPS); }, 2);
 
         // Area to handle mouse events
         var area = svg.append("rect")
@@ -186,7 +189,7 @@ Utilities.extendObject(window.benchmarkController, {
                 .attr("x2", cursor_x)
                 .attr("y2", yRight(cursor_y));
 
-            document.querySelector("#test-graph nav .time").textContent = data.time.toFixed(3) + "s (" + index + ")";
+            document.querySelector("#test-graph nav .time").textContent = data.time.toFixed(4) + "s (" + index + ")";
             statsToHighlight.forEach(function(name) {
                 var element = document.querySelector("#test-graph nav ." + name);
                 var content = "";
index b22b9b3..f41e110 100644 (file)
@@ -1,5 +1,26 @@
 2016-02-06  Jon Lee  <jonlee@apple.com>
 
+        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  <jonlee@apple.com>
+
         Refactor helper methods for getting random values for a stage.
 
         Instead of requiring a Stage instance, just attach it to the Stage object.