https://bugs.webkit.org/show_bug.cgi?id=146219
Reviewed by Andreas Kling.
Fetch A/B testing results regardless of the platform to which results are submitted
by providing the platform ID to which the results were submitted for each test group.
* public/api/test-groups.php:
(main): Include the platform id in the test groups.
* public/v2/analysis.js:
(App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185852
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-06-22 Ryosuke Niwa <rniwa@webkit.org>
+
+ A/B testing results should be shown even if they were submitted to different platforms
+ https://bugs.webkit.org/show_bug.cgi?id=146219
+
+ Reviewed by Andreas Kling.
+
+ Fetch A/B testing results regardless of the platform to which results are submitted
+ by providing the platform ID to which the results were submitted for each test group.
+
+ * public/api/test-groups.php:
+ (main): Include the platform id in the test groups.
+ * public/v2/analysis.js:
+ (App.TestGroup._fetchTestResults): Fetch results from the platform associated with the group.
+
2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
Remove unnecessary svn:executable flags
2015-06-19 Csaba Osztrogonác <ossy@webkit.org>
Remove unnecessary svn:executable flags
$test_groups = array_map("format_test_group", $test_groups);
$group_by_id = array();
$test_groups = array_map("format_test_group", $test_groups);
$group_by_id = array();
- foreach ($test_groups as &$group)
- $group_by_id[$group['id']] = &$group;
+ foreach ($test_groups as &$group) {
+ $group_id = $group['id'];
+ $group_by_id[$group_id] = &$group;
+ $platforms = $db->query_and_fetch_all('SELECT DISTINCT(config_platform)
+ FROM test_configurations, test_runs, build_requests
+ WHERE run_config = config_id AND run_build = request_build AND request_group = $1', array($group_id));
+ if ($platforms)
+ $group['platform'] = $platforms[0]['config_platform'];
+ }
$build_requests = $build_requests_fetcher->results();
foreach ($build_requests as $request) {
$build_requests = $build_requests_fetcher->results();
foreach ($build_requests as $request) {
createdAt: DS.attr('date'),
buildRequests: DS.hasMany('buildRequests'),
rootSets: DS.hasMany('rootSets'),
createdAt: DS.attr('date'),
buildRequests: DS.hasMany('buildRequests'),
rootSets: DS.hasMany('rootSets'),
+ platform: DS.belongsTo('platform'),
_fetchTestResults: function ()
{
var task = this.get('task');
_fetchTestResults: function ()
{
var task = this.get('task');
+ var platform = this.get('platform');
+ if (!task || !platform)
return null;
var self = this;
return App.Manifest.fetchRunsWithPlatformAndMetric(this.store,
return null;
var self = this;
return App.Manifest.fetchRunsWithPlatformAndMetric(this.store,
- task.get('platform').get('id'), task.get('metric').get('id'), this.get('id')).then(
+ platform.get('id'), task.get('metric').get('id'), this.get('id')).then(
function (result) { self.set('testResults', result.data); },
function (error) {
// FIXME: Somehow this never gets called.
alert('Failed to fetch the results:' + error);
return null;
});
function (result) { self.set('testResults', result.data); },
function (error) {
// FIXME: Somehow this never gets called.
alert('Failed to fetch the results:' + error);
return null;
});
- }.observes('task', 'task.platform', 'task.metric').on('init'),
+ }.observes('task', 'task.platform', 'task.metric', 'platform').on('init'),
});
App.TestGroup.create = function (analysisTask, name, rootSets, repetitionCount)
});
App.TestGroup.create = function (analysisTask, name, rootSets, repetitionCount)