Log Message
Highlight the alarming test results in the graphics benchmark results page https://bugs.webkit.org/show_bug.cgi?id=151286
Patch by Said Abou-Hallawa <sabouhall...@apple.com> on 2015-11-16 Reviewed by Simon Fraser. When showing the results of a test in the graphics benchmark the following criteria is going to be applied: 1. If the standard deviation of the test complexity or the frame rate is equal to or more than 10%, the standard deviation and the test name will be displayed in red. 2. If the average frame rate is not in the range = [(desired_frame_rate - 2) .. (desired_frame_rate + 2)], the average frame rate and the test name will be displayed in red. * Animometer/resources/extensions.js: (ResultsTable.prototype._showHeaderRow): (ResultsTable.prototype._showHeader): (ResultsTable.prototype._showEmptyCell): (ResultsTable.prototype._showText): (ResultsTable.prototype._showFixedNumber): (ResultsTable.prototype.): (ResultsTable.prototype._showGraph): (ResultsTable.prototype._showJSON): (ResultsTable.prototype._isAlarmingMeasurement): (ResultsTable.prototype._isAlarmingTestResults): (ResultsTable.prototype._showEmptyCells): (ResultsTable.prototype._showEmptyRow): (ResultsTable.prototype._showTest): (ResultsTable.prototype._showSuite): (ResultsTable.prototype._showIteration): (ResultsTable.prototype.showRecord): (ResultsTable.prototype.showIterations): (ResultsTable.prototype._showEmpty): Deleted. * Animometer/runner/resources/animometer.js: (window.benchmarkRunnerClient.didFinishLastIteration): * Animometer/tests/resources/stage.js: (StageBenchmark.prototype.showResults):
Modified Paths
Diff
Modified: trunk/PerformanceTests/Animometer/resources/extensions.js (192493 => 192494)
--- trunk/PerformanceTests/Animometer/resources/extensions.js 2015-11-16 23:49:22 UTC (rev 192493)
+++ trunk/PerformanceTests/Animometer/resources/extensions.js 2015-11-16 23:52:46 UTC (rev 192494)
@@ -274,16 +274,14 @@
_showHeaderRow: function(row, queue, headers, message)
{
headers.forEach(function (header) {
- var th = document.createElement("th");
+ var th = DocumentExtension.createElement("th", {}, row);
th.textContent = header.text;
if (typeof message != "undefined" && message.length) {
- th.appendChild(document.createElement('br'));
- th.appendChild(document.createTextNode('[' + message +']'));
+ th.innerHTML += "<br>" + '[' + message +']';
message = "";
}
if ("width" in header)
th.width = header.width + "%";
- row.appendChild(th);
queue.push({element: th, headers: header.children });
});
},
@@ -323,37 +321,33 @@
}
},
- _showEmpty: function(row)
+ _showEmptyCell: function(row, className)
{
- var td = document.createElement("td");
- row.appendChild(td);
+ return DocumentExtension.createElement("td", { class: className }, row);
},
- _showText: function(row, text)
+ _showText: function(row, text, className)
{
- var td = document.createElement("td");
+ var td = DocumentExtension.createElement("td", { class: className }, row);
td.textContent = text;
- row.appendChild(td);
},
- _showFixedNumber: function(row, value, digits)
+ _showFixedNumber: function(row, value, digits, className)
{
- var td = document.createElement("td");
+ var td = DocumentExtension.createElement("td", { class: className }, row);
td.textContent = value.toFixed(digits || 2);
- row.appendChild(td);
},
_showGraph: function(row, testName, testResults)
{
var data = ""
if (!data) {
- this._showEmpty(row);
+ this._showEmptyCell(row, "");
return;
}
- var td = document.createElement("td");
- var button = document.createElement("button");
- button.className = "small-button";
+ var td = DocumentExtension.createElement("td", {}, row);
+ var button = DocumentExtension.createElement("button", { class: "small-button" }, td);
button.addEventListener("click", function() {
var samples = data[Strings["JSON_GRAPH"][0]];
@@ -363,40 +357,78 @@
});
button.textContent = Strings["TEXT_RESULTS"][1] + "...";
- td.appendChild(button);
- row.appendChild(td);
},
_showJSON: function(row, testName, testResults)
{
var data = ""
if (!data) {
- this._showEmpty(row);
+ this._showEmptyCell(row, "");
return;
}
-
- var td = document.createElement("td");
- var button = document.createElement("button");
- button.className = "small-button";
+ var td = DocumentExtension.createElement("td", {}, row);
+ var button = DocumentExtension.createElement("button", { class: "small-button" }, td);
+
button.addEventListener("click", function() {
benchmarkController.showTestJSON(testName, testResults);
});
button.textContent = Strings["TEXT_RESULTS"][2] + "...";
- td.appendChild(button);
- row.appendChild(td);
},
+
+ _isNoisyMeasurement: function(index, data, measurement, options)
+ {
+ const percentThreshold = 10;
+ const averageThreshold = 2;
+
+ if (measurement == Strings["JSON_MEASUREMENTS"][3])
+ return data[Strings["JSON_MEASUREMENTS"][3]] >= percentThreshold;
+
+ if (index == 1 && measurement == Strings["JSON_MEASUREMENTS"][0])
+ return Math.abs(data[Strings["JSON_MEASUREMENTS"][0]] - options["frame-rate"]) >= averageThreshold;
- _showTest: function(testName, testResults)
+ return false;
+ },
+
+ _isNoisyTest: function(testResults, options)
{
- var row = document.createElement("tr");
+ for (var index = 0; index < 2; ++index) {
+ var data = ""
+ for (var measurement in data) {
+ if (this._isNoisyMeasurement(index, data, measurement, options))
+ return true;
+ }
+ }
+ return false;
+ },
+
+ _showEmptyCells: function(row, headers)
+ {
+ for (var index = 0; index < headers.length; ++index) {
+ if (!headers[index].children.length)
+ this._showEmptyCell(row, "suites-separator");
+ else
+ this._showEmptyCells(row, headers[index].children);
+ }
+ },
+
+ _showEmptyRow: function()
+ {
+ var row = DocumentExtension.createElement("tr", {}, this.element);
+ this._showEmptyCells(row, this._headers);
+ },
+
+ _showTest: function(testName, testResults, options)
+ {
+ var row = DocumentExtension.createElement("tr", {}, this.element);
+ var className = this._isNoisyTest(testResults, options) ? "noisy-results" : "";
for (var index = 0; index < this._headers.length; ++index) {
switch (index) {
case 0:
- this._showText(row, testName);
+ this._showText(row, testName, className);
break;
case 1:
@@ -408,7 +440,7 @@
case 3:
var data = "" - 2]];
for (var measurement in data)
- this._showFixedNumber(row, data[measurement], 2);
+ this._showFixedNumber(row, data[measurement], 2, this._isNoisyMeasurement(index - 2, data, measurement, options) ? className : "");
break;
case 4:
@@ -417,38 +449,38 @@
break;
}
}
-
- this.element.appendChild(row);
},
- _showSuite: function(suiteName, suiteResults)
+ _showSuite: function(suiteName, suiteResults, options)
{
for (var testName in suiteResults[Strings["JSON_RESULTS"][2]]) {
- this._showTest(testName, suiteResults[Strings["JSON_RESULTS"][2]][testName]);
+ this._showTest(testName, suiteResults[Strings["JSON_RESULTS"][2]][testName], options);
}
},
- _showIteration : function(iterationResults)
+ _showIteration : function(iterationResults, options)
{
for (var suiteName in iterationResults[Strings["JSON_RESULTS"][1]]) {
- this._showSuite(suiteName, iterationResults[Strings["JSON_RESULTS"][1]][suiteName]);
+ if (suiteName != Object.keys(iterationResults[Strings["JSON_RESULTS"][1]])[0])
+ this._showEmptyRow();
+ this._showSuite(suiteName, iterationResults[Strings["JSON_RESULTS"][1]][suiteName], options);
}
},
- showRecord: function(testName, message, testResults)
+ showRecord: function(testName, message, testResults, options)
{
this.clear();
this._showHeader(message);
- this._showTest(testName, testResults);
+ this._showTest(testName, testResults, options);
},
- showIterations: function(iterationsResults)
+ showIterations: function(iterationsResults, options)
{
this.clear();
this._showHeader("");
iterationsResults.forEach(function(iterationResults) {
- this._showIteration(iterationResults);
+ this._showIteration(iterationResults, options);
}, this);
}
}
Modified: trunk/PerformanceTests/Animometer/runner/resources/animometer.css (192493 => 192494)
--- trunk/PerformanceTests/Animometer/runner/resources/animometer.css 2015-11-16 23:49:22 UTC (rev 192493)
+++ trunk/PerformanceTests/Animometer/runner/resources/animometer.css 2015-11-16 23:52:46 UTC (rev 192494)
@@ -161,6 +161,14 @@
color: black;
}
+.results-table td.noisy-results {
+ color: red;
+}
+
+.results-table td.suites-separator {
+ background-color: yellow;
+}
+
/* -------------------------------------------------------------------------- */
/* Results JSON */
/* -------------------------------------------------------------------------- */
Modified: trunk/PerformanceTests/Animometer/runner/resources/animometer.js (192493 => 192494)
--- trunk/PerformanceTests/Animometer/runner/resources/animometer.js 2015-11-16 23:49:22 UTC (rev 192493)
+++ trunk/PerformanceTests/Animometer/runner/resources/animometer.js 2015-11-16 23:52:46 UTC (rev 192494)
@@ -45,7 +45,7 @@
{
var json = this._resultsDashboard.toJSON(true, true);
this.score = json[Strings["JSON_SCORE"]];
- this._resultsTable.showIterations(json[Strings["JSON_RESULTS"][0]]);
+ this._resultsTable.showIterations(json[Strings["JSON_RESULTS"][0]], this.options);
sectionsManager.showJSON("json", json[Strings["JSON_RESULTS"][0]][0]);
suitesManager.updateLocalStorageFromJSON(json[Strings["JSON_RESULTS"][0]][0]);
benchmarkController.showResults();
Modified: trunk/PerformanceTests/Animometer/tests/resources/stage.js (192493 => 192494)
--- trunk/PerformanceTests/Animometer/tests/resources/stage.js 2015-11-16 23:49:22 UTC (rev 192493)
+++ trunk/PerformanceTests/Animometer/tests/resources/stage.js 2015-11-16 23:52:46 UTC (rev 192494)
@@ -173,7 +173,7 @@
return;
if (this._options["show-running-results"])
- this._recordTable.showRecord(this._test.name, message, this._sampler.toJSON(true, false));
+ this._recordTable.showRecord(this._test.name, message, this._sampler.toJSON(true, false), this._options);
this._progressBar.setPos(progress);
}
Modified: trunk/PerformanceTests/ChangeLog (192493 => 192494)
--- trunk/PerformanceTests/ChangeLog 2015-11-16 23:49:22 UTC (rev 192493)
+++ trunk/PerformanceTests/ChangeLog 2015-11-16 23:52:46 UTC (rev 192494)
@@ -1,5 +1,46 @@
2015-11-16 Said Abou-Hallawa <sabouhall...@apple.com>
+ Highlight the alarming test results in the graphics benchmark results page
+ https://bugs.webkit.org/show_bug.cgi?id=151286
+
+ Reviewed by Simon Fraser.
+
+ When showing the results of a test in the graphics benchmark the following
+ criteria is going to be applied:
+
+ 1. If the standard deviation of the test complexity or the frame rate is
+ equal to or more than 10%, the standard deviation and the test name
+ will be displayed in red.
+ 2. If the average frame rate is not in the range = [(desired_frame_rate - 2)
+ .. (desired_frame_rate + 2)], the average frame rate and the test name will
+ be displayed in red.
+
+ * Animometer/resources/extensions.js:
+ (ResultsTable.prototype._showHeaderRow):
+ (ResultsTable.prototype._showHeader):
+ (ResultsTable.prototype._showEmptyCell):
+ (ResultsTable.prototype._showText):
+ (ResultsTable.prototype._showFixedNumber):
+ (ResultsTable.prototype.):
+ (ResultsTable.prototype._showGraph):
+ (ResultsTable.prototype._showJSON):
+ (ResultsTable.prototype._isAlarmingMeasurement):
+ (ResultsTable.prototype._isAlarmingTestResults):
+ (ResultsTable.prototype._showEmptyCells):
+ (ResultsTable.prototype._showEmptyRow):
+ (ResultsTable.prototype._showTest):
+ (ResultsTable.prototype._showSuite):
+ (ResultsTable.prototype._showIteration):
+ (ResultsTable.prototype.showRecord):
+ (ResultsTable.prototype.showIterations):
+ (ResultsTable.prototype._showEmpty): Deleted.
+ * Animometer/runner/resources/animometer.js:
+ (window.benchmarkRunnerClient.didFinishLastIteration):
+ * Animometer/tests/resources/stage.js:
+ (StageBenchmark.prototype.showResults):
+
+2015-11-16 Said Abou-Hallawa <sabouhall...@apple.com>
+
Clean referencing the options object in the graphics benchmark
https://bugs.webkit.org/show_bug.cgi?id=151284
_______________________________________________ webkit-changes mailing list webkit-changes@lists.webkit.org https://lists.webkit.org/mailman/listinfo/webkit-changes