Class: Puppet::Util::Profiler::WallClock Private
- Defined in:
- lib/puppet/util/profiler/wall_clock.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
A profiler implementation that measures the number of seconds a segment of code takes to execute and provides a callback with a string representation of the profiling information.
Defined Under Namespace
Classes: Timer
Instance Method Summary collapse
- #finish(context) ⇒ Object private
- #start ⇒ Object private
Methods inherited from Logging
Constructor Details
This class inherits a constructor from Puppet::Util::Profiler::Logging
Instance Method Details
#finish(context) ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 |
# File 'lib/puppet/util/profiler/wall_clock.rb', line 13 def finish(context) context.stop "took #{context} seconds" end |
#start ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
9 10 11 |
# File 'lib/puppet/util/profiler/wall_clock.rb', line 9 def start Timer.new end |