Changeset 173332 in webkit


Ignore:
Timestamp:
Sep 5, 2014 1:57:55 PM (10 years ago)
Author:
ap@apple.com
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().

Location:
trunk/Tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js

    r173322 r173332  
    238238        }.bind(this), {});
    239239
     240        // Find the oldest iteration for each queue. Revisions landed before a new bot was added are considered fully tested
     241        // even without results from the not yet existent bot.
     242        // 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.
     243        var lastTestedRevisionByQueue = {};
     244        queues.forEach(function(queue) {
     245            var queueIterations = queue.iterations.filter(function(iteration) { return iteration.finished; });
     246            queueIterations.sort(function(a, b) { return b.endTime - a.endTime; });
     247            if (queueIterations.length > 0)
     248                lastTestedRevisionByQueue[queue.id] = queueIterations[queueIterations.length - 1].openSourceRevision;
     249        });
     250
    240251        var previousFullyTestedRevisionNumber = -1;
    241         var lastTestedRevisionByQueue = queues.reduce(function(previousValue, queue) {
    242             previousValue[queue.id] = -1;
    243             return previousValue;
    244         }, {});
    245252
    246253        for (var i = 0; i < iterationsByRevision.length; ++i) {
    247254            var iteration = iterationsByRevision[i];
    248255
    249             console.assert(lastTestedRevisionByQueue[iteration.queue.id] <= iteration.openSourceRevision);
     256            console.assert(lastTestedRevisionByQueue[iteration.queue.id] === undefined || lastTestedRevisionByQueue[iteration.queue.id] <= iteration.openSourceRevision);
    250257            lastTestedRevisionByQueue[iteration.queue.id] = iteration.openSourceRevision;
    251258
  • trunk/Tools/ChangeLog

    r173331 r173332  
     12014-09-05  Alexey Proskuryakov  <ap@apple.com>
     2
     3        Buildbot metrics page gives wrong results after a new bot gets added
     4        https://bugs.webkit.org/show_bug.cgi?id=136516
     5
     6        Reviewed by Tim Horton.
     7
     8        Part 2: Fix elapsed times.
     9
     10        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/MetricsAnalyzer.js:
     11        (Analyzer.prototype._countTimes): Made lastTestedRevisionByQueue contain undefined values
     12        until the first build in a queue. This happens to work as needed with _fullyTestedRevisionNumber().
     13
    1142014-09-05  Carlos Alberto Lopez Perez  <clopez@igalia.com>
    215
Note: See TracChangeset for help on using the changeset viewer.