Class: ProfProcessor
- Inherits:
-
ProfiledProcessor
- Object
- TestProcessor
- ProfiledProcessor
- ProfProcessor
- Defined in:
- lib/action_profiler/prof_processor.rb
Overview
A ProfiledProcessor that uses Shugo Maeda’s Prof profiler.
The Prof profiler requires Ruby 1.8.3 or better and can be found at shugo.net/archive/ruby-prof/
The Prof profiler is configured to use gettimeofday(2). There is no way to change this setting.
Constant Summary
Constants inherited from ProfiledProcessor
Instance Method Summary collapse
-
#initialize(*args) ⇒ ProfProcessor
constructor
:nodoc:.
-
#print_profile(io = STDERR) ⇒ Object
:nodoc:.
-
#start_profile ⇒ Object
:nodoc:.
-
#stop_profile ⇒ Object
Prof returns profile data on Prof.stop, so save it for printing.
Methods inherited from ProfiledProcessor
load_default_processor, load_processor, process_args, #profile
Methods inherited from TestProcessor
Constructor Details
#initialize(*args) ⇒ ProfProcessor
:nodoc:
17 18 19 20 |
# File 'lib/action_profiler/prof_processor.rb', line 17 def initialize(*args) # :nodoc: super @profile_data = nil end |
Instance Method Details
#print_profile(io = STDERR) ⇒ Object
:nodoc:
33 34 35 36 |
# File 'lib/action_profiler/prof_processor.rb', line 33 def print_profile(io = STDERR) # :nodoc: return unless @profile_data Prof.print_profile @profile_data, io end |
#start_profile ⇒ Object
:nodoc:
22 23 24 |
# File 'lib/action_profiler/prof_processor.rb', line 22 def start_profile # :nodoc: Prof.start end |
#stop_profile ⇒ Object
Prof returns profile data on Prof.stop, so save it for printing.
29 30 31 |
# File 'lib/action_profiler/prof_processor.rb', line 29 def stop_profile # :nodoc: @profile_data = Prof.stop end |