diff options
author | José Valim <jose.valim@gmail.com> | 2010-07-25 22:59:50 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-07-25 23:00:15 +0200 |
commit | f4200b0cd5c21d7bd37a9b5c9effc2006485ed46 (patch) | |
tree | 046acbe779674deaa9f2ed9ca538e44d604e4657 | |
parent | 751f89b8b28634cb237d1e47f33ddefaa13829dc (diff) | |
download | rails-f4200b0cd5c21d7bd37a9b5c9effc2006485ed46.tar.gz rails-f4200b0cd5c21d7bd37a9b5c9effc2006485ed46.tar.bz2 rails-f4200b0cd5c21d7bd37a9b5c9effc2006485ed46.zip |
Cache instrumenter again as per Aaron's patch.
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract_adapter.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb index c103fcccf7..69a963c3d3 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract_adapter.rb @@ -43,6 +43,7 @@ module ActiveRecord @runtime = 0 @query_cache_enabled = false @query_cache = {} + @instrumenter = ActiveSupport::Notifications.instrumenter end # Returns the human-readable name of the adapter. Use mixed case - one @@ -198,7 +199,7 @@ module ActiveRecord def log(sql, name) name ||= "SQL" - ActiveSupport::Notifications.instrument("sql.active_record", + @instrumenter.instrument("sql.active_record", :sql => sql, :name => name, :connection_id => object_id) do yield end |