Class: Puppet::Util::Profiler::Logging
- Defined in:
- lib/puppet/util/profiler/logging.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Sequence
Instance Method Summary collapse
- #finish(context, description, metric_id) ⇒ Object
-
#initialize(logger, identifier) ⇒ Logging
constructor
A new instance of Logging.
- #shutdown ⇒ Object
- #start(description, metric_id) ⇒ Object
Constructor Details
Instance Method Details
#finish(context, description, metric_id) ⇒ Object
14 15 16 17 18 |
# File 'lib/puppet/util/profiler/logging.rb', line 14 def finish(context, description, metric_id) profile_explanation = do_finish(context, description, metric_id)[:msg] @sequence.up @logger.call("PROFILE [#{@identifier}] #{@sequence} #{description}: #{profile_explanation}") end |
#shutdown ⇒ Object
20 21 22 |
# File 'lib/puppet/util/profiler/logging.rb', line 20 def shutdown() # nothing to do end |
#start(description, metric_id) ⇒ Object
8 9 10 11 12 |
# File 'lib/puppet/util/profiler/logging.rb', line 8 def start(description, metric_id) @sequence.next @sequence.down do_start(description, metric_id) end |