Perf dashboard's v2 UI shouldn't hide auto-detected outliers
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Jun 2015 08:16:24 +0000 (08:16 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Sat, 13 Jun 2015 08:16:24 +0000 (08:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=145940

Reviewed by Darin Adler.

Don't fallback to the default strategies for moving averages and envelope when one is not specified.
Also deleted the code to mark points outside the envelop as outliers.

* public/v2/app.js:

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

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

index 13d09a0..affd2bb 100644 (file)
@@ -1,3 +1,15 @@
+2015-06-13  Ryosuke Niwa  <rniwa@webkit.org>
+
+        Perf dashboard's v2 UI shouldn't hide auto-detected outliers
+        https://bugs.webkit.org/show_bug.cgi?id=145940
+
+        Reviewed by Darin Adler.
+
+        Don't fallback to the default strategies for moving averages and envelope when one is not specified.
+        Also deleted the code to mark points outside the envelop as outliers.
+
+        * public/v2/app.js:
+
 2015-06-12  Ryosuke Niwa  <rniwa@webkit.org>
 
         Unreviewed build fix for merging platforms.
index 0e3422c..04dab60 100755 (executable)
@@ -586,8 +586,10 @@ App.Pane = Ember.Object.extend({
 
         var rawValues = chartData.current.rawValues();
         var movingAverageIsSetByUser = movingAverageStrategy && movingAverageStrategy.execute;
-        var movingAverageValues = Statistics.executeStrategy(
-            movingAverageIsSetByUser ? movingAverageStrategy : Statistics.MovingAverageStrategies[0], rawValues);
+        if (!movingAverageIsSetByUser)
+            return null;
+
+        var movingAverageValues = Statistics.executeStrategy(movingAverageStrategy, rawValues);
         if (!movingAverageValues)
             return null;
 
@@ -595,33 +597,23 @@ App.Pane = Ember.Object.extend({
         if (movingAverageStrategy && movingAverageStrategy.isSegmentation && testRangeSelectionStrategy && testRangeSelectionStrategy.execute)
             testRangeCandidates = Statistics.executeStrategy(testRangeSelectionStrategy, rawValues, [movingAverageValues]);
 
-        var envelopeIsSetByUser = envelopingStrategy && envelopingStrategy.execute;
-        var envelopeDelta = Statistics.executeStrategy(envelopeIsSetByUser ? envelopingStrategy : Statistics.EnvelopingStrategies[0],
-            rawValues, [movingAverageValues]);
-
-        for (var i = 0; i < currentTimeSeriesData.length; i++) {
-            var currentValue = currentTimeSeriesData[i].value;
-            var movingAverageValue = movingAverageValues[i];
-            if (currentValue < movingAverageValue - envelopeDelta || movingAverageValue + envelopeDelta < currentValue)
-                currentTimeSeriesData[i].isOutlier = true;
-        }
-        if (!envelopeIsSetByUser)
-            envelopeDelta = null;
-
-        var anomalies = {};
-        if (anomalyDetectionStrategies.length) {
-            var isAnomalyArray = new Array(currentTimeSeriesData.length);
-            for (var strategy of anomalyDetectionStrategies) {
-                var anomalyLengths = Statistics.executeStrategy(strategy, rawValues, [movingAverageValues, envelopeDelta]);
-                for (var i = 0; i < currentTimeSeriesData.length; i++)
-                    isAnomalyArray[i] = isAnomalyArray[i] || anomalyLengths[i];
-            }
-            for (var i = 0; i < isAnomalyArray.length; i++) {
-                if (!isAnomalyArray[i])
-                    continue;
-                anomalies[currentTimeSeriesData[i].measurement.id()] = true;
-                while (isAnomalyArray[i] && i < isAnomalyArray.length)
-                    ++i;
+        if (envelopingStrategy && envelopingStrategy.execute) {
+            var envelopeDelta = Statistics.executeStrategy(envelopingStrategy, rawValues, [movingAverageValues]);
+            var anomalies = {};
+            if (anomalyDetectionStrategies.length) {
+                var isAnomalyArray = new Array(currentTimeSeriesData.length);
+                for (var strategy of anomalyDetectionStrategies) {
+                    var anomalyLengths = Statistics.executeStrategy(strategy, rawValues, [movingAverageValues, envelopeDelta]);
+                    for (var i = 0; i < currentTimeSeriesData.length; i++)
+                        isAnomalyArray[i] = isAnomalyArray[i] || anomalyLengths[i];
+                }
+                for (var i = 0; i < isAnomalyArray.length; i++) {
+                    if (!isAnomalyArray[i])
+                        continue;
+                    anomalies[currentTimeSeriesData[i].measurement.id()] = true;
+                    while (isAnomalyArray[i] && i < isAnomalyArray.length)
+                        ++i;
+                }
             }
         }