lib/new_relic/stats.rb in newrelic_rpm-3.5.4.35.beta vs lib/new_relic/stats.rb in newrelic_rpm-3.5.5.38

- old
+ new

@@ -217,16 +217,18 @@ def freeze @end_time = Time.now super end - def to_json(*a) - {'call_count' => call_count, - 'min_call_time' => min_call_time, - 'max_call_time' => max_call_time, - 'total_call_time' => total_call_time, - 'total_exclusive_time' => total_exclusive_time, - 'sum_of_squares' => sum_of_squares}.to_json(*a) + def to_json(*_) + { + 'call_count' => call_count.to_i, + 'min_call_time' => min_call_time.to_f, + 'max_call_time' => max_call_time.to_f, + 'total_call_time' => total_call_time.to_f, + 'total_exclusive_time' => total_exclusive_time.to_f, + 'sum_of_squares' => sum_of_squares.to_f + }.to_json(*_) end # In this class, we explicitly don't track begin and end time here, to save space during # cross process serialization via xml. Still the accessor methods must be provided for merge to work.