https://bugs.webkit.org/show_bug.cgi?id=175252
Reviewed by Antti Koivisto.
The bug was caused by TestGroupResultsViewer always listing every top-level test which has a result for the
entire analysis task. Since a custom analysis task (perf try bots) allows multiple tests to be tested in each
group, we have to only list the tests which contains results in a particular test group.
* public/v3/components/test-group-results-viewer.js:
(TestGroupResultsViewer.prototype.render): Find the tests that have results for the current test group instead
of for any test group in this analysis task.
any test
* public/v3/models/analysis-results.js:
(AnalysisResults):
(AnalysisResults.prototype.topLevelTestsForTestGroup): Renamed from highestTests. Now takes a test group
as an argument.
(AnalysisResults.prototype._computedTopLevelTests): Renamed from _computeHighestTests. Filters the results
with the specified test group.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@221871
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-09-11 Ryosuke Niwa <rniwa@webkit.org>
+
+ Analysis task page shows an empty results for an irrelevant top-level test
+ https://bugs.webkit.org/show_bug.cgi?id=175252
+
+ Reviewed by Antti Koivisto.
+
+ The bug was caused by TestGroupResultsViewer always listing every top-level test which has a result for the
+ entire analysis task. Since a custom analysis task (perf try bots) allows multiple tests to be tested in each
+ group, we have to only list the tests which contains results in a particular test group.
+
+ * public/v3/components/test-group-results-viewer.js:
+ (TestGroupResultsViewer.prototype.render): Find the tests that have results for the current test group instead
+ of for any test group in this analysis task.
+ any test
+ * public/v3/models/analysis-results.js:
+ (AnalysisResults):
+ (AnalysisResults.prototype.topLevelTestsForTestGroup): Renamed from highestTests. Now takes a test group
+ as an argument.
+ (AnalysisResults.prototype._computedTopLevelTests): Renamed from _computeHighestTests. Filters the results
+ with the specified test group.
+
2017-09-06 Aakash Jain <aakash_jain@apple.com>
Add initSyncers method in BuildbotTriggerable
if (!this._testGroup || !this._analysisResults)
return;
- this._renderResultsTableLazily.evaluate(this._testGroup, this._expandedTests, ...this._analysisResults.highestTests());
- this._renderCurrentMetricsLazily.evaluate(this._currentMetric);
+ this._renderResultsTableLazily.evaluate(this._testGroup, this._expandedTests,
+ ...this._analysisResults.topLevelTestsForTestGroup(this._testGroup));
}
_renderResultsTable(testGroup, expandedTests, ...tests)
{
this._metricToBuildMap = {};
this._metricIds = [];
- this._lazilyComputedHighestTests = new LazilyEvaluatedFunction(this._computeHighestTests);
+ this._lazilyComputedTopLevelTests = new LazilyEvaluatedFunction(this._computedTopLevelTests.bind(this));
}
findResult(buildId, metricId)
return map[buildId];
}
- highestTests() { return this._lazilyComputedHighestTests.evaluate(this._metricIds); }
+ topLevelTestsForTestGroup(testGroup)
+ {
+ return this._lazilyComputedTopLevelTests.evaluate(testGroup, ...this._metricIds);
+ }
+
+ _computedTopLevelTests(testGroup, ...metricIds)
+ {
+ const metrics = metricIds.map((metricId) => Metric.findById(metricId));
+ const tests = new Set(metrics.map((metric) => metric.test()));
+ const topLevelMetrics = metrics.filter((metric) => !tests.has(metric.test().parentTest()));
+
+ const topLevelTests = new Set;
+ for (const request of testGroup.buildRequests()) {
+ for (const metric of topLevelMetrics) {
+ if (this.findResult(request.buildId(), metric.id()))
+ topLevelTests.add(metric.test());
+ }
+ }
+ return topLevelTests;
+ }
containsTest(test)
{