Perf dashboard should show relative change in values
[WebKit-https.git] / Websites / perf.webkit.org / public / v2 / app.js
index 0f75449..58f8288 100755 (executable)
@@ -424,7 +424,13 @@ App.Pane = Ember.Object.extend({
             label = formatter(Math.abs(diffFromTarget)) + ' until target';
 
         var valueDelta = previousPoint ? chartData.deltaFormatter(currentPoint.value - previousPoint.value) : null;
-        return {className: className, label: label, currentValue: chartData.formatter(currentPoint.value), valueDelta: valueDelta};
+        return {
+            className: className,
+            label: label,
+            currentValue: chartData.formatter(currentPoint.value),
+            valueDelta: valueDelta,
+            relativeDelta: d3.format('+.2p')((currentPoint.value - previousPoint.value) / previousPoint.value),
+        };
     },
     _relativeDifferentToLaterPointInTimeSeries: function (currentPoint, timeSeries)
     {