Class: Mongo::Server::Connection
- Inherits:
-
Object
- Object
- Mongo::Server::Connection
- Defined in:
- lib/patches/db/mongo.rb
Overview
Mongo/Mongoid 5 patches
Instance Method Summary collapse
- #dispatch_with_timing(*args, &blk) ⇒ Object (also: #dispatch)
Instance Method Details
#dispatch_with_timing(*args, &blk) ⇒ Object Also known as: dispatch
5 6 7 8 9 10 11 12 |
# File 'lib/patches/db/mongo.rb', line 5 def dispatch_with_timing(*args, &blk) return dispatch_without_timing(*args, &blk) unless SqlPatches.should_measure? result, _record = SqlPatches.record_sql(args[0][0].payload.inspect) do dispatch_without_timing(*args, &blk) end result end |