mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Cache instrumenter again as per Aaron's patch.
This commit is contained in:
parent
751f89b8b2
commit
f4200b0cd5
1 changed files with 2 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue