Build fix. A/B testing is broken when continuous builders report revisions out of...
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2015 09:03:11 +0000 (09:03 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 23 Jun 2015 09:03:11 +0000 (09:03 +0000)
* public/v2/app.js:
(App.AnalysisTaskController.Ember.Controller.extend.):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@185869 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v2/app.js

index 9cc6ec0..4ac5d71 100644 (file)
@@ -1,3 +1,10 @@
+2015-06-23  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Build fix. A/B testing is broken when continuous builders report revisions out of order.
+
+        * public/v2/app.js:
+        (App.AnalysisTaskController.Ember.Controller.extend.):
+
 2015-06-22  Ryosuke Niwa  <rniwa@webkit.org>
 
         A/B testing results should be shown even if they were submitted to different platforms
index 3d76cc0..ed2dde7 100644 (file)
@@ -1331,19 +1331,16 @@ App.AnalysisTaskController = Ember.Controller.extend({
             var revisions = point.measurement.formattedRevisions();
             for (var repositoryId in revisions) {
                 if (!repositoryToRevisions[repositoryId])
-                    repositoryToRevisions[repositoryId] = {commits: null, revisions: []};
+                    repositoryToRevisions[repositoryId] = new Array();
                 var revision = revisions[repositoryId];
-                repositoryToRevisions[repositoryId].revisions[pointIndex] = {
-                    label: point.label + ': ' + revision.label,
-                    value: revision.currentRevision,
-                };
+                repositoryToRevisions[repositoryId].push({time: point.measurement.latestCommitTime(), value: revision.currentRevision});
             }
         });
 
         var commitsPromises = [];
         var repositoryToIndex = {};
         for (var repositoryId in repositoryToRevisions) {
-            var revisions = repositoryToRevisions[repositoryId].revisions;
+            var revisions = repositoryToRevisions[repositoryId].sort(function (a, b) { return a.time - b.time; });
             repositoryToIndex[repositoryId] = commitsPromises.length;
             commitsPromises.push(CommitLogs.fetchCommits(repositoryId, revisions[0].value, revisions[revisions.length - 1].value));
         }