Sha256: 774e185011a529b35849579a379049c04e875d4e21d9bfad143a263cc5d64fd4
Contents?: true
Size: 512 Bytes
Versions: 12
Compression:
Stored size: 512 Bytes
Contents
# Mongo/Mongoid 5 patches class Mongo::Server::Connection 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 return result end # TODO: change to Module#prepend as soon as Ruby 1.9.3 support is dropped alias_method :dispatch_without_timing, :dispatch alias_method :dispatch, :dispatch_with_timing end
Version data entries
12 entries across 12 versions & 2 rubygems