Build fix. A/B testing is broken when continuous builders report revisions out of...
[WebKit-https.git] / Websites / perf.webkit.org / public / v2 / app.js
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));
         }