X-Git-Url: https://review.fuel-infra.org/gitweb?a=blobdiff_plain;f=doc%2FMCollective%2FRunnerStats.html;fp=doc%2FMCollective%2FRunnerStats.html;h=e2fc6609a11d3dd2de63982e00c8a7ecda434f74;hb=7c9314f502cde8daad23b61d10b24a542e04154a;hp=0000000000000000000000000000000000000000;hpb=d1f1649ba43c5cbc43c4beb2380096ba051d646a;p=packages%2Fprecise%2Fmcollective.git diff --git a/doc/MCollective/RunnerStats.html b/doc/MCollective/RunnerStats.html new file mode 100644 index 0000000..e2fc660 --- /dev/null +++ b/doc/MCollective/RunnerStats.html @@ -0,0 +1,734 @@ + + + +
+ + ++Class to store stats about the mcollectived, it should live in the PluginManager so that agents etc can get hold +of it and return the stats to callers +
+ +(Not documented)
+ + + ++ # File lib/mcollective/runnerstats.rb, line 5 + 5: def initialize + 6: @starttime = Time.now.to_i + 7: @validated = 0 + 8: @unvalidated = 0 + 9: @filtered = 0 +10: @passed = 0 +11: @total = 0 +12: @replies = 0 +13: @ttlexpired = 0 +14: +15: @mutex = Mutex.new +16: end+
+Records a message that didnt pass the filters +
+ + + ++ # File lib/mcollective/runnerstats.rb, line 31 +31: def filtered +32: Log.debug("Incrementing filtered stat") +33: @filtered += 1 +34: end+
+Records a message that passed the filters +
+ + + ++ # File lib/mcollective/runnerstats.rb, line 25 +25: def passed +26: Log.debug("Incrementing passed stat") +27: @passed += 1 +28: end+
+Records receipt of a message +
+ + + ++ # File lib/mcollective/runnerstats.rb, line 48 +48: def received +49: Log.debug("Incrementing total stat") +50: @total += 1 +51: end+
+Records sending a message +
+ + + ++ # File lib/mcollective/runnerstats.rb, line 54 +54: def sent +55: @mutex.synchronize do +56: Log.debug("Incrementing replies stat") +57: @replies += 1 +58: end +59: end+
+Returns a hash with all stats +
+ + + ++ # File lib/mcollective/runnerstats.rb, line 62 +62: def to_hash +63: stats = {:validated => @validated, +64: :unvalidated => @unvalidated, +65: :passed => @passed, +66: :filtered => @filtered, +67: :starttime => @starttime, +68: :total => @total, +69: :ttlexpired => @ttlexpired, +70: :replies => @replies} +71: +72: reply = {:stats => stats, +73: :threads => [], +74: :pid => Process.pid, +75: :times => {} } +76: +77: ::Process.times.each_pair{|k,v| +78: k = k.to_sym +79: reply[:times][k] = v +80: } +81: +82: Thread.list.each do |t| +83: reply[:threads] << "#{t.inspect}" +84: end +85: +86: reply[:agents] = Agents.agentlist +87: reply +88: end+
+Records a message that failed TTL checks +
+ + + ++ # File lib/mcollective/runnerstats.rb, line 19 +19: def ttlexpired +20: Log.debug("Incrementing ttl expired stat") +21: @ttlexpired += 1 +22: end+
Disabled; run with --debug to generate this.
+ +Generated with the Darkfish + Rdoc Generator 1.1.6.
+