Sha256: bdc602637c81a1679c7f535b1ebcdc549704e568f9cac026bd8fc35ec8f4efdd

Contents?: true

Size: 392 Bytes

Versions: 12

Compression:

Stored size: 392 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

12 entries across 12 versions & 1 rubygems

Version Path
rails_performance-1.4.1 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.1.alpha1 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.0 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.0.alpha5 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.0.alpha4 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.0.alpha3 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.0.alpha2 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.4.0.alpha1 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.3.3 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.3.2 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.3.1 lib/rails_performance/reports/response_time_report.rb
rails_performance-1.3.0 lib/rails_performance/reports/response_time_report.rb