Sha256: 502f0c3b54e6dec7457df4c1255689285bf52b997c7bceb808b0a2b9e6b0723f

Contents?: true

Size: 406 Bytes

Versions: 5

Compression:

Stored size: 406 Bytes

Contents

module RailsPerformance
  module Reports
    class ResponseTimeReport < BaseReport
      def set_defaults
        @group ||= :datetime
      end

      def data
        calculate_data do |all, k, v|
          durations = v.collect{|e| e["duration"]}.compact
          next if durations.empty?
          all[k] = durations.sum.to_f / durations.count
        end
      end
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rails_performance-1.2.3 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.2.2 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.2.1 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.2.0 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.2.0.alpha5 lib/rails_performance/reports/response_time_report.rb