Module: Puppet::Util::Profiler Private
- Defined in:
- lib/puppet/util/profiler.rb
Overview
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
A simple profiling callback system.
Defined Under Namespace
Classes: Logging, None, ObjectCounts, WallClock
Constant Summary collapse
- NONE =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
Puppet::Util::Profiler::None.new
Class Method Summary collapse
-
.clear ⇒ Object
private
Reset the profiling system to the original state.
-
.current ⇒ Object
private
This thread’s configured profiler.
- .current=(profiler) ⇒ Object private
- .profile(message, &block) ⇒ Object private
Class Method Details
.clear ⇒ 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.
Reset the profiling system to the original state
14 15 16 |
# File 'lib/puppet/util/profiler.rb', line 14 def self.clear @profiler = nil end |
.current ⇒ 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.
Returns This thread’s configured profiler.
19 20 21 |
# File 'lib/puppet/util/profiler.rb', line 19 def self.current @profiler || NONE end |
.current=(profiler) ⇒ 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.
24 25 26 |
# File 'lib/puppet/util/profiler.rb', line 24 def self.current=(profiler) @profiler = profiler end |
.profile(message, &block) ⇒ 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.
30 31 32 |
# File 'lib/puppet/util/profiler.rb', line 30 def self.profile(, &block) current.profile(, &block) end |