Title: [199498] trunk/Websites/perf.webkit.org
Revision
199498
Author
rn...@webkit.org
Date
2016-04-13 09:25:13 -0700 (Wed, 13 Apr 2016)

Log Message

REGRESSION(r199444): Perf dashboard always fetches all measurement sets
https://bugs.webkit.org/show_bug.cgi?id=156534

Reviewed by Darin Adler.

The bug was cased by SummaryPage's constructor fetching all measurement sets. Since each page is always
constructed in main(), this resulted in all measurement sets being fetched on all pages.

* public/v3/pages/summary-page.js:
(SummaryPage):
(SummaryPage.prototype.open): Fetch measurement set JSONs here.
(SummaryPage.prototype._createConfigurationGroup): Renamed from _createConfigurationGroupAndStartFetchingData.

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (199497 => 199498)


--- trunk/Websites/perf.webkit.org/ChangeLog	2016-04-13 16:16:13 UTC (rev 199497)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2016-04-13 16:25:13 UTC (rev 199498)
@@ -1,3 +1,18 @@
+2016-04-13  Ryosuke Niwa  <rn...@webkit.org>
+
+        REGRESSION(r199444): Perf dashboard always fetches all measurement sets
+        https://bugs.webkit.org/show_bug.cgi?id=156534
+
+        Reviewed by Darin Adler.
+
+        The bug was cased by SummaryPage's constructor fetching all measurement sets. Since each page is always
+        constructed in main(), this resulted in all measurement sets being fetched on all pages.
+
+        * public/v3/pages/summary-page.js:
+        (SummaryPage):
+        (SummaryPage.prototype.open): Fetch measurement set JSONs here.
+        (SummaryPage.prototype._createConfigurationGroup): Renamed from _createConfigurationGroupAndStartFetchingData.
+
 2016-04-12  Ryosuke Niwa  <rn...@webkit.org>
 
         Add a summary page to v3 UI

Modified: trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js (199497 => 199498)


--- trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js	2016-04-13 16:16:13 UTC (rev 199497)
+++ trunk/Websites/perf.webkit.org/public/v3/pages/summary-page.js	2016-04-13 16:25:13 UTC (rev 199498)
@@ -11,9 +11,8 @@
         };
         this._shouldConstructTable = true;
         this._renderQueue = [];
+        this._configGroups = [];
 
-        var current = Date.now();
-        var timeRange = [current - 7 * 24 * 3600 * 1000, current];
         for (var metricGroup of summarySettings.metricGroups) {
             var group = {name: metricGroup.name, rows: []};
             this._table.groups.push(group);
@@ -21,7 +20,7 @@
                 var row = {name: subMetricGroup.name, cells: []};
                 group.rows.push(row);
                 for (var platformGroup of summarySettings.platformGroups)
-                    row.cells.push(this._createConfigurationGroupAndStartFetchingData(platformGroup.platforms, subMetricGroup.metrics, timeRange));
+                    row.cells.push(this._createConfigurationGroup(platformGroup.platforms, subMetricGroup.metrics));
             }
         }
     }
@@ -31,6 +30,11 @@
     open(state)
     {
         super.open(state);
+
+        var current = Date.now();
+        var timeRange = [current - 7 * 24 * 3600 * 1000, current];
+        for (var group of this._configGroups)
+            group.fetchAndComputeSummary(timeRange).then(this.render.bind(this));
     }
     
     render()
@@ -44,12 +48,12 @@
             render();
     }
 
-    _createConfigurationGroupAndStartFetchingData(platformIdList, metricIdList, timeRange)
+    _createConfigurationGroup(platformIdList, metricIdList)
     {
         var platforms = platformIdList.map(function (id) { return Platform.findById(id); }).filter(function (obj) { return !!obj; });
         var metrics = metricIdList.map(function (id) { return Metric.findById(id); }).filter(function (obj) { return !!obj; });
         var configGroup = new SummaryPageConfigurationGroup(platforms, metrics);
-        configGroup.fetchAndComputeSummary(timeRange).then(this.render.bind(this));
+        this._configGroups.push(configGroup);
         return configGroup;
     }
 
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to