- Revision
- 173065
- Author
- a...@apple.com
- Date
- 2014-08-28 10:26:08 -0700 (Thu, 28 Aug 2014)
Log Message
Dashboard metrics page could show longest stretch of red
https://bugs.webkit.org/show_bug.cgi?id=136334
Reviewed by Sam Weinig.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
(Analyzer.prototype._updateStretchOfRedCounters):
(Analyzer.prototype._countPercentageOfGreen):
When counting percentage of green, also keep track of how long the page was red.
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsView.js:
(MetricsView.prototype._update.addDivider):
(MetricsView.prototype._update.appendQueueResults):
Show it in aggregate queues (can't think of a reason to have it in individual ones).
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Metrics.css:
Changed to use an explicit divider element between green time and performance groups,
as there are too many combinations to easily express in CSS.
Modified Paths
Diff
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js (173064 => 173065)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js 2014-08-28 17:22:59 UTC (rev 173064)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js 2014-08-28 17:26:08 UTC (rev 173065)
@@ -105,6 +105,24 @@
return true;
},
+ _updateStretchOfRedCounters: function(topIterationByQueue, currentTime, stretchOfRedCounters)
+ {
+ var isRedNow = false;
+ for (queueID in topIterationByQueue) {
+ if (!topIterationByQueue[queueID].successful) {
+ isRedNow = true;
+ break;
+ }
+ }
+ if (isRedNow) {
+ if (stretchOfRedCounters.currentStretchOfRedStart === undefined)
+ stretchOfRedCounters.currentStretchOfRedStart = currentTime;
+ } else if (stretchOfRedCounters.currentStretchOfRedStart !== undefined) {
+ stretchOfRedCounters.longestStretchOfRed = Math.max(stretchOfRedCounters.longestStretchOfRed, currentTime - stretchOfRedCounters.currentStretchOfRedStart);
+ stretchOfRedCounters.currentStretchOfRedStart = undefined;
+ }
+ },
+
_countPercentageOfGreen: function(queues, result)
{
var topIterationByQueue = {};
@@ -131,9 +149,14 @@
// Go forward in time, ignoring out of order iterations that didn't affect queue color.
var currentTime = this._rangeStartTime;
var greenTime = 0;
+ var stretchOfRedCounters = {
+ longestStretchOfRed: 0,
+ currentStretchOfRedStart: undefined
+ };
var earliestTimeInRangeWhereAllQueuesHaveResults;
if (this._allQueuesAreSuccessful(topIterationByQueue, queues) !== undefined)
earliestTimeInRangeWhereAllQueuesHaveResults = this._rangeStartTime;
+ this._updateStretchOfRedCounters(topIterationByQueue, this._rangeStartTime, stretchOfRedCounters);
for (var i = iterations.length - 1; i >= 0; --i) {
if (iterations[i].endTime <= this._rangeStartTime) {
console.assert(iterations[i].queue.id in topIterationByQueue);
@@ -146,6 +169,7 @@
currentTime = iterations[i].endTime;
earliestTimeInRangeWhereAllQueuesHaveResults = currentTime;
}
+ this._updateStretchOfRedCounters(topIterationByQueue, currentTime, stretchOfRedCounters);
continue;
}
if (iterations[i].openSourceRevision <= topIterationByQueue[iterations[i].queue.id].openSourceRevision)
@@ -158,11 +182,17 @@
greenTime += iterations[i].endTime - currentTime;
currentTime = iterations[i].endTime;
+ this._updateStretchOfRedCounters(topIterationByQueue, currentTime, stretchOfRedCounters);
}
if (this._allQueuesAreSuccessful(topIterationByQueue, queues) === true)
greenTime += this._rangeEndTime - currentTime;
+ if (stretchOfRedCounters.currentStretchOfRedStart !== undefined)
+ stretchOfRedCounters.longestStretchOfRed = Math.max(stretchOfRedCounters.longestStretchOfRed, this._rangeEndTime - stretchOfRedCounters.currentStretchOfRedStart);
+
+ result.longestStretchOfRed = stretchOfRedCounters.longestStretchOfRed / 1000;
+
if (earliestTimeInRangeWhereAllQueuesHaveResults === this._rangeStartTime)
result.percentageOfGreen = greenTime / (this._rangeEndTime - this._rangeStartTime) * 100;
else {
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsView.js (173064 => 173065)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsView.js 2014-08-28 17:22:59 UTC (rev 173064)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsView.js 2014-08-28 17:26:08 UTC (rev 173065)
@@ -90,6 +90,13 @@
element.lastChild.classList.add("error-line");
}
+ function addDivider(element)
+ {
+ var divider = document.createElement("div");
+ divider.classList.add("divider");
+ element.appendChild(divider);
+ }
+
function appendQueueResults(queue)
{
if (!(queue.id in this._results))
@@ -97,13 +104,21 @@
var result = this._results[queue.id];
- if (result.buildbotRangeError && -1 === this._aggregatePseudoQueues.indexOf(queue))
+ var isAggregateQueue = -1 !== this._aggregatePseudoQueues.indexOf(queue);
+
+ if (result.buildbotRangeError && !isAggregateQueue)
addError(this.element, result.buildbotRangeErrorText);
if ("percentageOfGreen" in result)
addLine(this.element, "Green " + Math.round(result.percentageOfGreen * 100) / 100 + "% of time");
- if (queue.builder || -1 !== this._aggregatePseudoQueues.indexOf(queue)) {
+ if (isAggregateQueue && result.longestStretchOfRed) {
+ addLine(this.element, "Longest red: " + Math.round(result.longestStretchOfRed / 60) + " minutes");
+ addDivider(this.element);
+ } else if ("percentageOfGreen" in result)
+ addDivider(this.element);
+
+ if (queue.builder || isAggregateQueue) {
addLine(this.element, "Time from commit: ");
addLine(this.element, "Average: " + Math.round(result.averageSecondsFromCommit / 60) + " minutes");
addLine(this.element, "Median: " + Math.round(result.medianSecondsFromCommit / 60) + " minutes");
Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Metrics.css (173064 => 173065)
--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Metrics.css 2014-08-28 17:22:59 UTC (rev 173064)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Metrics.css 2014-08-28 17:26:08 UTC (rev 173065)
@@ -58,7 +58,7 @@
.queue-view .error-line + .result-line,
.result-line:first-child
{
- padding: 10px 0 6px 0;
+ padding: 10px 0 2px 0;
font-weight: bold;
}
@@ -66,6 +66,14 @@
color: rgb(191, 67, 41);
}
+.queue-view .divider {
+ height: 6px;
+}
+
+table.aggregate-grid .queue-view .divider {
+ height: 10px;
+}
+
.metrics-loading-indicator {
font-family: "HelveticaNeue-Light", sans-serif;
font-size: 14px;
Modified: trunk/Tools/ChangeLog (173064 => 173065)
--- trunk/Tools/ChangeLog 2014-08-28 17:22:59 UTC (rev 173064)
+++ trunk/Tools/ChangeLog 2014-08-28 17:26:08 UTC (rev 173065)
@@ -1,3 +1,24 @@
+2014-08-28 Alexey Proskuryakov <a...@apple.com>
+
+ Dashboard metrics page could show longest stretch of red
+ https://bugs.webkit.org/show_bug.cgi?id=136334
+
+ Reviewed by Sam Weinig.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
+ (Analyzer.prototype._updateStretchOfRedCounters):
+ (Analyzer.prototype._countPercentageOfGreen):
+ When counting percentage of green, also keep track of how long the page was red.
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsView.js:
+ (MetricsView.prototype._update.addDivider):
+ (MetricsView.prototype._update.appendQueueResults):
+ Show it in aggregate queues (can't think of a reason to have it in individual ones).
+
+ * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Metrics.css:
+ Changed to use an explicit divider element between green time and performance groups,
+ as there are too many combinations to easily express in CSS.
+
2014-08-28 Carlos Garcia Campos <cgar...@igalia.com>
[GTK] Add webkit_uri_response_get_http_headers to WebKit2 GTK+ API