This commit adds some instrumentation probes for the various verbs
of the indirector.

Signed-off-by: Brice Figureau <[email protected]>
---
 lib/puppet/indirector/indirection.rb |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)

diff --git a/lib/puppet/indirector/indirection.rb 
b/lib/puppet/indirector/indirection.rb
index d958a82..bbd47c4 100644
--- a/lib/puppet/indirector/indirection.rb
+++ b/lib/puppet/indirector/indirection.rb
@@ -2,6 +2,7 @@ require 'puppet/util/docs'
 require 'puppet/indirector/envelope'
 require 'puppet/indirector/request'
 require 'puppet/util/cacher'
+require 'puppet/util/instrumentation/instrumentable'
 
 # The class that connects functional classes with their different collection
 # back-ends.  Each indirection has a set of associated terminus classes,
@@ -9,6 +10,12 @@ require 'puppet/util/cacher'
 class Puppet::Indirector::Indirection
   include Puppet::Util::Cacher
   include Puppet::Util::Docs
+  extend Puppet::Util::Instrumentation::Instrumentable
+
+  probe :find, :label => Proc.new { |parent, key, *args| 
"find_#{parent.name}_#{parent.terminus_class}" }, :data => Proc.new { |parent, 
key, *args| { :key => key }}
+  probe :save, :label => Proc.new { |parent, key, *args| 
"save_#{parent.name}_#{parent.terminus_class}" }, :data => Proc.new { |parent, 
key, *args| { :key => key }}
+  probe :search, :label => Proc.new { |parent, key, *args| 
"search_#{parent.name}_#{parent.terminus_class}" }, :data => Proc.new { 
|parent, key, *args| { :key => key }}
+  probe :destroy, :label => Proc.new { |parent, key, *args| 
"destroy_#{parent.name}_#{parent.terminus_class}" }, :data => Proc.new { 
|parent, key, *args| { :key => key }}
 
   @@indirections = []
 
-- 
1.7.5.1

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Developers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-dev?hl=en.

Reply via email to