class Mmtrix::Agent::StatsEngine
This class handles all the statistics gathering for the agent
@api public
This module exists only for backwards-compatibility reasons. Sampler
functionality is now controlled by the SamplerManager class. @deprecated
Attributes
metric_rules[RW]
Public Class Methods
new()
click to toggle source
# File lib/mmtrix/agent/stats_engine.rb, line 19 def initialize @stats_lock = Mutex.new @stats_hash = StatsHash.new @metric_rules = RulesEngine.new end
Public Instance Methods
with_stats_lock() { || ... }
click to toggle source
All access to the @stats_hash ivar should be funnelled through this method to ensure thread-safety.
# File lib/mmtrix/agent/stats_engine.rb, line 27 def with_stats_lock @stats_lock.synchronize { yield } end