Title: [192818] trunk/Websites/perf.webkit.org
Revision
192818
Author
rn...@webkit.org
Date
2015-11-30 13:12:43 -0800 (Mon, 30 Nov 2015)

Log Message

Perf dashboard should extend baseline and target to the future
https://bugs.webkit.org/show_bug.cgi?id=151511

Reviewed by Darin Adler.

* public/v2/data.js:
(RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
(RunsData.prototype.timeSeriesByBuildTime): Ditto.
(RunsData.prototype._timeSeriesByTimeInternal): Ditto.
(TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
* public/v2/manifest.js:
(App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.

Modified Paths

Diff

Modified: trunk/Websites/perf.webkit.org/ChangeLog (192817 => 192818)


--- trunk/Websites/perf.webkit.org/ChangeLog	2015-11-30 21:09:42 UTC (rev 192817)
+++ trunk/Websites/perf.webkit.org/ChangeLog	2015-11-30 21:12:43 UTC (rev 192818)
@@ -1,5 +1,20 @@
 2015-11-30  Ryosuke Niwa  <rn...@webkit.org>
 
+        Perf dashboard should extend baseline and target to the future
+        https://bugs.webkit.org/show_bug.cgi?id=151511
+
+        Reviewed by Darin Adler.
+
+        * public/v2/data.js:
+        (RunsData.prototype.timeSeriesByCommitTime): Added extendToFuture as an argument.
+        (RunsData.prototype.timeSeriesByBuildTime): Ditto.
+        (RunsData.prototype._timeSeriesByTimeInternal): Ditto.
+        (TimeSeries): Add a new point to the end if extendToFuture is set and the series is not empty.
+        * public/v2/manifest.js:
+        (App.Manifest._formatFetchedData): Set extendToFuture to true for baselines and targets.
+
+2015-11-30  Ryosuke Niwa  <rn...@webkit.org>
+
         Perf dashboard should always show comparison to baseline and target even if one is missing
         https://bugs.webkit.org/show_bug.cgi?id=151510
 

Modified: trunk/Websites/perf.webkit.org/public/v2/data.js (192817 => 192818)


--- trunk/Websites/perf.webkit.org/public/v2/data.js	2015-11-30 21:09:42 UTC (rev 192817)
+++ trunk/Websites/perf.webkit.org/public/v2/data.js	2015-11-30 21:12:43 UTC (rev 192818)
@@ -323,17 +323,17 @@
     return this._measurements.length;
 }
 
-RunsData.prototype.timeSeriesByCommitTime = function (includeOutliers)
+RunsData.prototype.timeSeriesByCommitTime = function (includeOutliers, extendToFuture)
 {
-    return this._timeSeriesByTimeInternal(true, includeOutliers);
+    return this._timeSeriesByTimeInternal(true, includeOutliers, extendToFuture);
 }
 
-RunsData.prototype.timeSeriesByBuildTime = function (includeOutliers)
+RunsData.prototype.timeSeriesByBuildTime = function (includeOutliers, extendToFuture)
 {
-    return this._timeSeriesByTimeInternal(false, includeOutliers);
+    return this._timeSeriesByTimeInternal(false, includeOutliers, extendToFuture);
 }
 
-RunsData.prototype._timeSeriesByTimeInternal = function (useCommitType, includeOutliers)
+RunsData.prototype._timeSeriesByTimeInternal = function (useCommitType, includeOutliers, extendToFuture)
 {
     var series = new Array();
     var seriesIndex = 0;
@@ -349,7 +349,7 @@
             markedOutlier: measurement.markedOutlier(),
         });
     }
-    return new TimeSeries(series);
+    return new TimeSeries(series, extendToFuture);
 }
 
 // FIXME: We need to devise a way to fetch runs in multiple chunks so that
@@ -420,13 +420,26 @@
     return unit != 'fps' && unit != '/s' && unit != 'pt';
 }
 
-function TimeSeries(series)
+// FIXME: Extending the baseline/target to the future should be a server-side configuration.
+function TimeSeries(series, extendToFuture)
 {
     this._series = series.sort(function (a, b) {
         var diff = a.time - b.time;
         return diff ? diff : a.secondaryTime - b.secondaryTime;
     });
 
+    if (extendToFuture && this._series.length) {
+        var lastPoint = this._series[this._series.length - 1];
+        this._series.push({
+            measurement: lastPoint.measurement,
+            time: Date.now() + 24 * 3600 * 1000,
+            secondaryTime: Date.now() + 24 * 3600 * 1000,
+            value: lastPoint.value,
+            interval: lastPoint.interval,
+            markedOutlier: lastPoint.markedOutlier,
+        });
+    }
+
     var self = this;
     var min = undefined;
     var max = undefined;

Modified: trunk/Websites/perf.webkit.org/public/v2/manifest.js (192817 => 192818)


--- trunk/Websites/perf.webkit.org/public/v2/manifest.js	2015-11-30 21:09:42 UTC (rev 192817)
+++ trunk/Websites/perf.webkit.org/public/v2/manifest.js	2015-11-30 21:12:43 UTC (rev 192818)
@@ -365,12 +365,12 @@
         var deltaFormatterWithoutSign = this._makeFormatter(unit, 2, false);
 
         var currentTimeSeries = configurations.current.timeSeriesByCommitTime(false);
-        var baselineTimeSeries = configurations.baseline ? configurations.baseline.timeSeriesByCommitTime(false) : null;
-        var targetTimeSeries = configurations.target ? configurations.target.timeSeriesByCommitTime(false) : null;
+        var baselineTimeSeries = configurations.baseline ? configurations.baseline.timeSeriesByCommitTime(false, true) : null;
+        var targetTimeSeries = configurations.target ? configurations.target.timeSeriesByCommitTime(false, true) : null;
 
         var unfilteredCurrentTimeSeries = configurations.current.timeSeriesByCommitTime(true);
-        var unfilteredBaselineTimeSeries = configurations.baseline ? configurations.baseline.timeSeriesByCommitTime(true) : null;
-        var unfilteredTargetTimeSeries = configurations.target ? configurations.target.timeSeriesByCommitTime(true) : null;
+        var unfilteredBaselineTimeSeries = configurations.baseline ? configurations.baseline.timeSeriesByCommitTime(true, true) : null;
+        var unfilteredTargetTimeSeries = configurations.target ? configurations.target.timeSeriesByCommitTime(true, true) : null;
 
         return {
             current: currentTimeSeries,
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to