New perf dashboard should have multiple dashboard pages
[WebKit-https.git] / Websites / perf.webkit.org / public / v2 / data.js
index 2da2fefed69d6722d4d7d6991b81ddd81abd119c..dfe3133d323746e1130835086753d4d782761a1b 100755 (executable)
@@ -360,6 +360,11 @@ TimeSeries.prototype.findPointByMeasurementId = function (measurementId)
     return this._series.find(function (point) { return point.measurement.id() == measurementId; });
 }
 
     return this._series.find(function (point) { return point.measurement.id() == measurementId; });
 }
 
+TimeSeries.prototype.findPointAfterTime = function (time)
+{
+    return this._series.find(function (point) { return point.time >= time; });
+}
+
 TimeSeries.prototype.seriesBetweenPoints = function (startPoint, endPoint)
 {
     if (!startPoint.seriesIndex || !endPoint.seriesIndex)
 TimeSeries.prototype.seriesBetweenPoints = function (startPoint, endPoint)
 {
     if (!startPoint.seriesIndex || !endPoint.seriesIndex)
@@ -400,6 +405,13 @@ TimeSeries.prototype.minMaxForTimeRange = function (startTime, endTime)
 
 TimeSeries.prototype.series = function () { return this._series; }
 
 
 TimeSeries.prototype.series = function () { return this._series; }
 
+TimeSeries.prototype.lastPoint = function ()
+{
+    if (!this._series || !this._series.length)
+        return null;
+    return this._series[this._series.length - 1];
+}
+
 TimeSeries.prototype.previousPoint = function (point)
 {
     if (!point.seriesIndex)
 TimeSeries.prototype.previousPoint = function (point)
 {
     if (!point.seriesIndex)