Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/patches/db/activerecord.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ def self.included(instrumented_class)
end
end

def log_with_miniprofiler(*args, &block)
return log_without_miniprofiler(*args, &block) unless SqlPatches.should_measure?
def log_with_miniprofiler(*args, **kwargs, &block)
return log_without_miniprofiler(*args, **kwargs, &block) unless SqlPatches.should_measure?

sql, name, binds = args
start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
rval = log_without_miniprofiler(*args, &block)
rval = log_without_miniprofiler(*args, **kwargs, &block)

# Don't log schema queries if the option is set
return rval if Rack::MiniProfiler.config.skip_schema_queries && name =~ (/SCHEMA/)
Expand Down
Loading