The chart status on v3 UI sometimes show wrong revision ranges
authorrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Dec 2015 17:32:47 +0000 (17:32 +0000)
committerrniwa@webkit.org <rniwa@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 16 Dec 2015 17:32:47 +0000 (17:32 +0000)
https://bugs.webkit.org/show_bug.cgi?id=152331

Reviewed by Chris Dumez.

The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
finds the sampled data point immediately preceding the current point (at which the indicator is shown).

* public/v3/components/chart-status-view.js:
(ChartStatusView.prototype.updateStatusIfNeeded):

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

Websites/perf.webkit.org/ChangeLog
Websites/perf.webkit.org/public/v3/components/chart-status-view.js

index 074abfa..b6feef3 100644 (file)
@@ -1,3 +1,17 @@
+2015-12-16  Ryosuke Niwa  <rniwa@webkit.org>
+
+        The chart status on v3 UI sometimes show wrong revision ranges
+        https://bugs.webkit.org/show_bug.cgi?id=152331
+
+        Reviewed by Chris Dumez.
+
+        The bug was caused by the status view not taking the data sampling that happens in TimeSeriesChart into account
+        when finding the previous point. Take this into account by using InteractiveTimeSeries.currentPoint(-1) which
+        finds the sampled data point immediately preceding the current point (at which the indicator is shown).
+
+        * public/v3/components/chart-status-view.js:
+        (ChartStatusView.prototype.updateStatusIfNeeded):
+
 2015-12-15  Ryosuke Niwa  <rniwa@webkit.org>
 
         Perf dashboard's cycler page should use v3 UI
index 0d0e165..7d688fd 100644 (file)
@@ -45,8 +45,6 @@ class ChartStatusView extends ComponentBase {
         var previousPoint;
 
         if (this._chart instanceof InteractiveTimeSeriesChart) {
-            currentPoint = this._chart.currentPoint();
-
             var selection = this._chart.currentSelection();
             if (selection && this._usedSelection == selection)
                 return false;
@@ -61,8 +59,10 @@ class ChartStatusView extends ComponentBase {
                     currentPoint = data[data.length - 1];
                     previousPoint = data[0];
                 }
-            } else if (currentPoint)
-                previousPoint = currentPoint.series.previousPoint(currentPoint);
+            } else  {
+                currentPoint = this._chart.currentPoint();
+                previousPoint = this._chart.currentPoint(-1);
+            }
         } else {
             var data = this._chart.sampledTimeSeriesData('current');
             if (!data)