Module: RailsPerformance::Extensions::Db
- Defined in:
- lib/rails_performance/extensions/trace.rb
Instance Method Summary collapse
-
#sql(event) ⇒ Object
in env this works if config.log_level = :debug.
Instance Method Details
#sql(event) ⇒ Object
in env this works if config.log_level = :debug
22 23 24 25 26 27 28 29 |
# File 'lib/rails_performance/extensions/trace.rb', line 22 def sql(event) CurrentRequest.current.trace({ group: :db, duration: event.duration.round(2), sql: event.payload[:sql] }) super end |