web/app/models/benchmark_result.rb
branchjv_rickshaw
changeset 133 bef72dea1e7e
parent 110 02126b7e1cbb
child 156 c2db68d42669
--- a/web/app/models/benchmark_result.rb	Mon Jul 15 00:54:11 2013 +0100
+++ b/web/app/models/benchmark_result.rb	Fri Jul 19 20:53:41 2013 +0100
@@ -28,4 +28,13 @@
     benchmark_durations.map { |duration| duration.duration }.max
   end
 
+  
+  def to_json
+    { 
+      timestamp: self.created_at.to_i * 1000, 
+      value: self.min_duration
+    }
+  end
+
+
 end