Sha256: a49b17326cabeed6cec9dc1e4565f61f80e2d0773eeb7e9047407e5a68e02730

Contents?: true

Size: 556 Bytes

Versions: 24

Compression:

Stored size: 556 Bytes

Contents

module RailsPerformance
  module Extensions
    module View

      def info(&block)
        CurrentRequest.current.trace({
          group: :view,
          message: block.call
        })
        super(&block)
      end

    end
  end
end

module RailsPerformance
  module Extensions
    module Db

      def sql(event)
        CurrentRequest.current.trace({
          group: :db,
          duration: event.duration.round(2),
          sql: event.payload[:sql]
        })
        super(event)
      end

    end
  end
end

Version data entries

24 entries across 24 versions & 1 rubygems

Version Path
rails_performance-1.2.3 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.2 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.1 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.0 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.0.alpha5 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.0.alpha4 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.0.alpha3 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.0.alpha2 lib/rails_performance/extensions/trace.rb
rails_performance-1.2.0.alpha1 lib/rails_performance/extensions/trace.rb
rails_performance-1.1.0 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.5.3 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.5.2 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.5.1 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.5 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.4 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.3 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.2 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.1 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.0 lib/rails_performance/extensions/trace.rb
rails_performance-1.0.0.beta5 lib/rails_performance/extensions/trace.rb