Title: [185852] trunk/Websites/perf.webkit.org
Revision
185852
Author
rn...@webkit.org
Date
2015-06-22 17:47:51 -0700 (Mon, 22 Jun 2015)

Log Message

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.

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (185851 => 185852)


--- trunk/Websites/perf.webkit.org/ChangeLog	2015-06-22 23:32:30 UTC (rev 185851)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2015-06-23 00:47:51 UTC (rev 185852)
@@ -1,3 +1,18 @@
+2015-06-22  Ryosuke Niwa  <rn...@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  <o...@webkit.org>
 
         Remove unnecessary svn:executable flags

Modified: trunk/Websites/perf.webkit.org/public/api/test-groups.php (185851 => 185852)


--- trunk/Websites/perf.webkit.org/public/api/test-groups.php	2015-06-22 23:32:30 UTC (rev 185851)
+++ trunk/Websites/perf.webkit.org/public/api/test-groups.php	2015-06-23 00:47:51 UTC (rev 185852)
@@ -35,8 +35,15 @@
 
     $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) {

Modified: trunk/Websites/perf.webkit.org/public/v2/analysis.js (185851 => 185852)


--- trunk/Websites/perf.webkit.org/public/v2/analysis.js	2015-06-22 23:32:30 UTC (rev 185851)
+++ trunk/Websites/perf.webkit.org/public/v2/analysis.js	2015-06-23 00:47:51 UTC (rev 185852)
@@ -129,21 +129,23 @@
     createdAt: DS.attr('date'),
     buildRequests: DS.hasMany('buildRequests'),
     rootSets: DS.hasMany('rootSets'),
+    platform: DS.belongsTo('platform'),
     _fetchTestResults: function ()
     {
         var task = this.get('task');
-        if (!task)
+        var platform = this.get('platform');
+        if (!task || !platform)
             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;
             });
-    }.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)
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to