Class: MotionProfiler::Profiler
- Inherits:
-
Object
- Object
- MotionProfiler::Profiler
- Defined in:
- lib/motion-profiler/profiler.rb
Overview
Velocity::Profiler collects execution time of method calls of an object.
Instance Method Summary collapse
-
#initialize(obj) ⇒ Profiler
constructor
Initializes a new Profiler to observe the given object.
-
#report ⇒ Object
Returns a report of the profile data collected on the object.
Constructor Details
#initialize(obj) ⇒ Profiler
Initializes a new Profiler to observe the given object.
7 8 9 10 11 12 |
# File 'lib/motion-profiler/profiler.rb', line 7 def initialize(obj) @obj = obj @data = Hash.new { |h, k| h[k] = [] } wrap_methods_with_profiling(self) end |