Module: Fiveruns::Tuneup::Instrumentation::ActiveRecord::Base
- Defined in:
- lib/fiveruns/tuneup/instrumentation/active_record/base.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary
collapse
Class Method Details
.record(model, name, raw_sql = nil, &operation) ⇒ Object
7
8
9
10
11
12
13
14
15
16
|
# File 'lib/fiveruns/tuneup/instrumentation/active_record/base.rb', line 7
def self.record(model, name, raw_sql=nil, &operation)
sql = nil
Fiveruns::Tuneup.exclude do
model.silence do
sql = Fiveruns::Tuneup::Step::SQL.new(raw_sql, model.connection) if raw_sql
Fiveruns::Tuneup.add_schema_for(model.table_name, model.connection)
end
end
Fiveruns::Tuneup.step(name, :model, true, sql, model.table_name, &operation)
end
|