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
16 17 18 19 20 |
# File 'lib/puppet/util/profiler/logging.rb', line 16 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
22 23 24 |
# File 'lib/puppet/util/profiler/logging.rb', line 22 def shutdown # nothing to do end |
#start(description, metric_id) ⇒ Object
10 11 12 13 14 |
# File 'lib/puppet/util/profiler/logging.rb', line 10 def start(description, metric_id) @sequence.next @sequence.down do_start(description, metric_id) end |