Sha256: 74f3d2f211c016d0cee9af1323d4d6a184fb2fd1023f63230d8748851ccd6238

Contents?: true

Size: 735 Bytes

Versions: 23

Compression:

Stored size: 735 Bytes

Contents

module RailsPerformance
  module Reports
    class CrashReport < BaseReport
      def set_defaults
        @sort ||= :datetime
      end

      def data
        db.data.collect do |record|
          {
            controller: record.controller,
            action: record.action,
            format: record.format,
            status: record.status,
            method: record.method,
            path: record.path,
            datetime: Time.parse(record.datetime),
            duration: record.value['duration'],
            db_runtime: record.value['db_runtime'],
            view_runtime: record.value['view_runtime'],
          }
        end.sort{|a, b| b[sort] <=> a[sort]}
      end
    end


  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
rails_performance-0.9.9 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.8 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.7 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.6 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.5 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.4 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.3 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.2 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.1 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.0.1 lib/rails_performance/reports/crash_report.rb
rails_performance-0.9.0 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.19 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.18 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.17 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.16 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.15 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.14 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.13 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.12 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.11 lib/rails_performance/reports/crash_report.rb