+2016-04-13 Ryosuke Niwa <rniwa@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 <rniwa@webkit.org>
Add a summary page to v3 UI
};
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);
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));
}
}
}
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()
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;
}