Rails 4 fork
Because loading gems can take longer than you think
$ curl -fsSL https://gist.github.com/raw/6121664/benchmark.rb | ruby
............................................................[DONE]
module ActiveRecord | |
module ConnectionAdapters | |
class AbstractAdapter | |
protected | |
# Rails 3.1 | |
def log_with_trace(sql, name = "SQL", binds = [], &block) | |
if @logger && @logger.debug? | |
c = caller.detect{|line| line !~ /(activerecord|active_support|__DELEGATION__|\/lib\/|\/vendor\/plugins|\/vendor\/gems)/i} | |
c ||= caller.first |