Title: [173332] trunk/Tools
Revision
173332
Author
a...@apple.com
Date
2014-09-05 13:57:55 -0700 (Fri, 05 Sep 2014)

Log Message

Buildbot metrics page gives wrong results after a new bot gets added
https://bugs.webkit.org/show_bug.cgi?id=136516

Reviewed by Tim Horton.

Part 2: Fix elapsed times.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
(Analyzer.prototype._countTimes): Made lastTestedRevisionByQueue contain undefined values
until the first build in a queue. This happens to work as needed with _fullyTestedRevisionNumber().

Modified Paths

Diff

Modified: trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js (173331 => 173332)


--- trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js	2014-09-05 20:25:01 UTC (rev 173331)
+++ trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js	2014-09-05 20:57:55 UTC (rev 173332)
@@ -237,16 +237,23 @@
             return result;
         }.bind(this), {});
 
+        // Find the oldest iteration for each queue. Revisions landed before a new bot was added are considered fully tested
+        // even without results from the not yet existent bot.
+        // Unfortunately, we don't know when the bot got added to dashboard, so we have to assume that it was there for as long as it had results.
+        var lastTestedRevisionByQueue = {};
+        queues.forEach(function(queue) {
+            var queueIterations = queue.iterations.filter(function(iteration) { return iteration.finished; });
+            queueIterations.sort(function(a, b) { return b.endTime - a.endTime; });
+            if (queueIterations.length > 0)
+                lastTestedRevisionByQueue[queue.id] = queueIterations[queueIterations.length - 1].openSourceRevision;
+        });
+
         var previousFullyTestedRevisionNumber = -1;
-        var lastTestedRevisionByQueue = queues.reduce(function(previousValue, queue) {
-            previousValue[queue.id] = -1;
-            return previousValue;
-        }, {});
 
         for (var i = 0; i < iterationsByRevision.length; ++i) {
             var iteration = iterationsByRevision[i];
 
-            console.assert(lastTestedRevisionByQueue[iteration.queue.id] <= iteration.openSourceRevision);
+            console.assert(lastTestedRevisionByQueue[iteration.queue.id] === undefined || lastTestedRevisionByQueue[iteration.queue.id] <= iteration.openSourceRevision);
             lastTestedRevisionByQueue[iteration.queue.id] = iteration.openSourceRevision;
 
             var newFullyTestedRevisionNumber = this._fullyTestedRevisionNumber(lastTestedRevisionByQueue);

Modified: trunk/Tools/ChangeLog (173331 => 173332)


--- trunk/Tools/ChangeLog	2014-09-05 20:25:01 UTC (rev 173331)
+++ trunk/Tools/ChangeLog	2014-09-05 20:57:55 UTC (rev 173332)
@@ -1,3 +1,16 @@
+2014-09-05  Alexey Proskuryakov  <a...@apple.com>
+
+        Buildbot metrics page gives wrong results after a new bot gets added
+        https://bugs.webkit.org/show_bug.cgi?id=136516
+
+        Reviewed by Tim Horton.
+
+        Part 2: Fix elapsed times.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
+        (Analyzer.prototype._countTimes): Made lastTestedRevisionByQueue contain undefined values
+        until the first build in a queue. This happens to work as needed with _fullyTestedRevisionNumber().
+
 2014-09-05  Carlos Alberto Lopez Perez  <clo...@igalia.com>
 
         [SOUP] Implement ResourceResponse::platformSuggestedFilename() when USE(SOUP) is enabled.
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to