Dashboard should show performance bots.
authordburkart@apple.com <dburkart@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Sep 2014 17:57:25 +0000 (17:57 +0000)
committerdburkart@apple.com <dburkart@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 3 Sep 2014 17:57:25 +0000 (17:57 +0000)
https://bugs.webkit.org/show_bug.cgi?id=136386

Reviewed by Alexey Proskuryakov.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
(BuildbotIteration.prototype._parseData.collectPerfTestResults):
(BuildbotIteration.prototype._parseData):
Support possible performance failures.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js:
New QueueView to manage the way we present performance data.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
(BuildbotQueue):
Support new 'performance' and 'performanceTestName' keys.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
Add performance column to the main page.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
(WebKitBuildbot):
* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
(body):
Make sure everything fits on 13 inch screens.

* BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:

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

Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js [new file with mode: 0644]
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css
Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html
Tools/ChangeLog

index a52b712..4986dbc 100644 (file)
@@ -79,6 +79,10 @@ BuildbotIteration.ProductiveSteps = {
     "webkitpy-test": 1,
     "webkitperl-test": 1,
     "bindings-generation-tests": 1,
+    "run Membuster OS Memory": 1,
+    "run scrollperf": 1,
+    "run PLT3": 1,
+    "perf-test": 1
 };
 
 BuildbotIteration.Event = {
@@ -194,7 +198,7 @@ BuildbotIteration.prototype = {
 
             testResults.finished = true;
 
-            if (!testStep.results || !testStep.results[0]) {
+            if (!testStep.results || testStep.results[0] === BuildbotIteration.SUCCESS) {
                 // All tests passed.
                 testResults.allPassed = true;
                 return testResults;
diff --git a/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js b/Tools/BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js
new file mode 100644 (file)
index 0000000..a8f4d4a
--- /dev/null
@@ -0,0 +1,134 @@
+/*
+ * Copyright (C) 2013, 2014 Apple Inc. All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. AND ITS CONTRIBUTORS ``AS IS''
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
+ * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR ITS CONTRIBUTORS
+ * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
+ * THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+BuildbotPerformanceQueueView = function(queues)
+{
+    BuildbotQueueView.call(this, [], queues);
+    this.update();
+};
+
+BaseObject.addConstructorFunctions(BuildbotPerformanceQueueView);
+
+BuildbotPerformanceQueueView.prototype = {
+    constructor: BuildbotPerformanceQueueView,
+    __proto__: BuildbotQueueView.prototype,
+
+    update: function()
+    {
+        QueueView.prototype.update.call(this);
+
+        this.element.removeChildren();
+
+        function appendPerformanceQueueStatus(queue)
+        {
+            var appendedStatus = false;
+
+            var limit = 2;
+            for (var i = 0; i < queue.iterations.length && limit > 0; ++i) {
+                var iteration = queue.iterations[i];
+                if (!iteration.loaded || !iteration.finished)
+                    continue;
+
+                --limit;
+
+                var willHaveAnotherStatusLine = i + 1 < queue.iterations.length && limit > 0 && !iteration.successful; // This is not 100% correct, as the remaining iterations may not be finished or loaded yet, but close enough.
+                var messageElement = this.revisionContentForIteration(iteration, (iteration.productive && willHaveAnotherStatusLine) ? iteration.previousProductiveIteration : null);
+
+                if (iteration.successful) {
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Good, "all tests passed");
+                    limit = 0;
+                } else if (!iteration.productive) {
+                    var url = iteration.queue.buildbot.buildPageURLForIteration(iteration);
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Danger, iteration.text, null, url);
+                } else if (iteration.failed) {
+                    var url = iteration.queue.buildbot.buildPageURLForIteration(iteration);
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Bad, iteration.text, null, url);
+                } else {
+                    var url = iteration.queue.buildbot.buildPageURLForIteration(iteration);
+                    var status = new StatusLineView(messageElement, StatusLineView.Status.Danger, iteration.text, null, url);
+                }
+
+                this.element.appendChild(status.element);
+                appendedStatus = true;
+            }
+
+            if (!appendedStatus) {
+                var status = new StatusLineView("unknown", StatusLineView.Status.Neutral, "last passing build");
+                this.element.appendChild(status.element);
+            }
+
+            new PopoverTracker(status.statusBubbleElement, this._presentPopoverForPerformanceQueue.bind(this), queue);
+        }
+
+        function appendBuild(queues, label)
+        {
+            queues.forEach(function(queue) {
+                var releaseLabel = document.createElement("a");
+                releaseLabel.classList.add("queueLabel");
+                releaseLabel.textContent = queue.performanceTestName ? queue.performanceTestName : label;
+                releaseLabel.href = queue.overviewURL;
+                releaseLabel.target = "_blank";
+                this.element.appendChild(releaseLabel);
+
+                appendPerformanceQueueStatus.call(this, queue);
+            }.bind(this));
+        }
+
+        appendBuild.call(this, this.releaseQueues, 'Release');
+    },
+
+    addLinkToRow: function(rowElement, className, text, url)
+    {
+        var linkElement = document.createElement("a");
+        linkElement.className = className;
+        linkElement.textContent = text;
+        linkElement.href = url;
+        linkElement.target = "_blank";
+        rowElement.appendChild(linkElement);
+    },
+
+    _popoverContentForPerformanceQueue: function(queue)
+    {
+        var content = document.createElement("div");
+        content.className = "performance-popover";
+
+        var row = document.createElement("div");
+        this.addLinkToRow(row, "dashboard-link", "Performance Dashboard", queue.buildbot.performanceDashboardURL);
+
+        content.appendChild(row);
+
+        return content;
+    },
+
+    _presentPopoverForPerformanceQueue: function(element, popover, queue)
+    {
+        var content = this._popoverContentForPerformanceQueue(queue);
+
+        var rect = Dashboard.Rect.rectFromClientRect(element.getBoundingClientRect());
+        popover.content = content;
+        popover.present(rect, [Dashboard.RectEdge.MIN_Y, Dashboard.RectEdge.MAX_Y, Dashboard.RectEdge.MAX_X, Dashboard.RectEdge.MIN_X]);
+        return true;
+    }
+};
index 20d36c0..b2a0c0b 100644 (file)
@@ -38,8 +38,10 @@ BuildbotQueue = function(buildbot, id, info)
     this.debug = info.debug || false;
     this.builder = info.builder || false;
     this.tester = info.tester || false;
+    this.performance = info.performance || false;
     this.architecture = info.architecture || null;
     this.testCategory = info.testCategory || null;
+    this.performanceTestName = info.performanceTestName || null;
 
     this.iterations = [];
     this._knownIterations = {};
index 96769fd..fd73abf 100644 (file)
@@ -43,6 +43,8 @@ for (var i = 0; i < buildbots.length; ++i) {
             categoryName = "builders";
         } else if (queue.tester) {
             categoryName = queue.testCategory;
+        } else if (queue.performance) {
+            categoryName = "performance";
         } else {
             console.assert("Unknown queue type.");
             continue;
@@ -148,6 +150,10 @@ function documentReady()
         row.appendChild(header);
     }
 
+    var header = document.createElement("th");
+    header.textContent = "Performance";
+    row.appendChild(header);
+
     if (hasEWS) {
         var header = document.createElement("th");
         header.textContent = "EWS";
@@ -206,6 +212,14 @@ function documentReady()
             row.appendChild(cell);
         }
 
+        var cell = document.createElement("td");
+        if (platformQueues.performance && platformQueues.performance.release) {
+            var view = new BuildbotPerformanceQueueView(platformQueues.performance.release);
+            cell.appendChild(view.element);
+        }
+
+        row.appendChild(cell);
+
         if (hasEWS) {
             var cell = document.createElement("td");
 
index aadbba6..e5d1096 100644 (file)
@@ -33,12 +33,14 @@ WebKitBuildbot = function()
         "Apple MountainLion Debug WK1 (Tests)": {platform: Dashboard.Platform.MacOSXMountainLion, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit1},
         "Apple MountainLion Release WK2 (Tests)": {platform: Dashboard.Platform.MacOSXMountainLion, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
         "Apple MountainLion Debug WK2 (Tests)": {platform: Dashboard.Platform.MacOSXMountainLion, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
+        "Apple MountainLion Release (Perf)": {platform: Dashboard.Platform.MacOSXMountainLion, debug: false, performance: true},
         "Apple Mavericks Debug (Build)": {platform: Dashboard.Platform.MacOSXMavericks, debug: true, builder: true, architecture: Buildbot.BuildArchitecture.SixtyFourBit},
         "Apple Mavericks Release (Build)": {platform: Dashboard.Platform.MacOSXMavericks, debug: false, builder: true, architecture: Buildbot.BuildArchitecture.SixtyFourBit},
         "Apple Mavericks Debug WK1 (Tests)": {platform: Dashboard.Platform.MacOSXMavericks, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit1},
         "Apple Mavericks Debug WK2 (Tests)": {platform: Dashboard.Platform.MacOSXMavericks, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
         "Apple Mavericks Release WK1 (Tests)": {platform: Dashboard.Platform.MacOSXMavericks, debug: false, tester: true, testCategory: Buildbot.TestCategory.WebKit1},
         "Apple Mavericks Release WK2 (Tests)": {platform: Dashboard.Platform.MacOSXMavericks, debug: false, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
+        "Apple Mavericks Release (Perf)": {platform: Dashboard.Platform.MacOSXMavericks, debug: false, performance: true},
         "Apple Win Debug (Build)": {platform: Dashboard.Platform.Windows7, debug: true, builder: true, architecture: Buildbot.BuildArchitecture.ThirtyTwoBit},
         "Apple Win Release (Build)": {platform: Dashboard.Platform.Windows7, builder: true, architecture: Buildbot.BuildArchitecture.ThirtyTwoBit},
         "Apple Win 7 Debug (Tests)": {platform: Dashboard.Platform.Windows7, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit1},
@@ -47,7 +49,9 @@ WebKitBuildbot = function()
         "GTK Linux 64-bit Release (Tests)": {platform: Dashboard.Platform.LinuxGTK, debug: false, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
         "GTK Linux 64-bit Debug (Build)": {platform: Dashboard.Platform.LinuxGTK, debug: true, builder: true, architecture: Buildbot.BuildArchitecture.SixtyFourBit},
         "GTK Linux 64-bit Debug (Tests)": {platform: Dashboard.Platform.LinuxGTK, debug: true, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
-        "EFL Linux 64-bit Release WK2": {platform: Dashboard.Platform.LinuxEFL, tester: true, testCategory: Buildbot.TestCategory.WebKit2}
+        "GTK Linux 64-bit Release (Perf)": {platform: Dashboard.Platform.LinuxGTK, debug: false, performance: true},
+        "EFL Linux 64-bit Release WK2": {platform: Dashboard.Platform.LinuxEFL, tester: true, testCategory: Buildbot.TestCategory.WebKit2},
+        "EFL Linux 64-bit Release WK2 (Perf)": {platform: Dashboard.Platform.LinuxEFL, performance: true}
     };
 
     Buildbot.call(this, "http://build.webkit.org/", queueInfo);
@@ -58,6 +62,7 @@ BaseObject.addConstructorFunctions(WebKitBuildbot);
 WebKitBuildbot.prototype = {
     constructor: WebKitBuildbot,
     __proto__: Buildbot.prototype,
+    performanceDashboardURL:  "https://perf.webkit.org",
 
     layoutTestResultsDirectoryURLForIteration: function(iteration)
     {
index 892d2eb..7cd201b 100644 (file)
@@ -89,7 +89,7 @@ div.cellButton.unhide {
 body {
     background-color: rgb(233, 231, 223);
     text-align: center;
-    margin: 50px;
+    margin: 50px 25px 50px 25px;
 }
 
 table.queue-grid {
index 356a91b..8679f4a 100644 (file)
@@ -50,6 +50,7 @@ THE POSSIBILITY OF SUCH DAMAGE.
     <script src="Scripts/BuildbotQueueView.js"></script>
     <script src="Scripts/BuildbotBuilderQueueView.js"></script>
     <script src="Scripts/BuildbotTesterQueueView.js"></script>
+    <script src="Scripts/BuildbotPerformanceQueueView.js"></script>
     <script src="Scripts/EWSQueueView.js"></script>
     <script src="Scripts/StatusLineView.js"></script>
     <script src="Scripts/Settings.js"></script>
index cd032d5..f4380a0 100644 (file)
@@ -1,3 +1,34 @@
+2014-09-03  Dana Burkart  <dburkart@apple.com>
+
+        Dashboard should show performance bots.
+        https://bugs.webkit.org/show_bug.cgi?id=136386
+
+        Reviewed by Alexey Proskuryakov.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotIteration.js:
+        (BuildbotIteration.prototype._parseData.collectPerfTestResults):
+        (BuildbotIteration.prototype._parseData):
+        Support possible performance failures.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotPerformanceQueueView.js:
+        New QueueView to manage the way we present performance data.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/BuildbotQueue.js:
+        (BuildbotQueue):
+        Support new 'performance' and 'performanceTestName' keys.
+
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/Main.js:
+        Add performance column to the main page.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Scripts/WebKitBuildbot.js:
+        (WebKitBuildbot):
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/Styles/Main.css:
+        (body):
+        Make sure everything fits on 13 inch screens.
+
+        * BuildSlaveSupport/build.webkit.org-config/public_html/dashboard/index.html:
+
 2014-09-03  Zan Dobersek  <zdobersek@igalia.com>
 
         GMainLoopSource is exposed to race conditions