class Mongo::Server::Connection

Mongo/Mongoid 5 patches

Public Instance Methods

dispatch(*args, &blk)
Also aliased as: dispatch_without_timing
dispatch_with_timing(*args, &blk) click to toggle source
# 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
Also aliased as: dispatch
dispatch_without_timing(*args, &blk)

TODO: change to Module#prepend as soon as Ruby 1.9.3 support is dropped

Alias for: dispatch