Class: SpeedGun::Profiler::ActiveRecord
- Defined in:
- lib/speed_gun/profiler/active_record.rb
Instance Attribute Summary
Attributes inherited from Base
#backtrace, #elapsed_time, #id, #parent_profile_id
Instance Method Summary collapse
Methods inherited from Base
#as_msgpack, hook_method, inherited, #initialize, label, #label, load, #measure, profile, #profile, profiler_type, #to_msgpack, #type
Constructor Details
This class inherits a constructor from SpeedGun::Profiler::Base
Instance Method Details
#before_profile(adapter, sql, name = nil) ⇒ Object
12 13 14 15 |
# File 'lib/speed_gun/profiler/active_record.rb', line 12 def before_profile(adapter, sql, name = nil) @sql = sql @name = name end |
#html ⇒ Object
8 9 10 |
# File 'lib/speed_gun/profiler/active_record.rb', line 8 def html %Q{<pre class="sql">#{@sql}</pre>} end |
#title ⇒ Object
4 5 6 |
# File 'lib/speed_gun/profiler/active_record.rb', line 4 def title "#{@name}" end |