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.0.1.10 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.9 lib/rails_performance/reports/crash_report.rb
rails_performance-0.0.1.8 lib/rails_performance/reports/crash_report.rb