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.
Direct Known Subclasses
Defined Under Namespace
Classes: Timer
Instance Method Summary collapse
- #do_finish(context, description, metric_id) ⇒ Object private
- #do_start(description, metric_id) ⇒ Object private
Methods inherited from Logging
#finish, #initialize, #shutdown, #start
Constructor Details
This class inherits a constructor from Puppet::Util::Profiler::Logging
Instance Method Details
#do_finish(context, description, metric_id) ⇒ 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.
15 16 17 18 |
# File 'lib/puppet/util/profiler/wall_clock.rb', line 15 def do_finish(context, description, metric_id) { :time => context.stop, :msg => _("took %{context} seconds") % { context: context } } end |