class OneApm::Collector::StatsEngine
This class handles all the statistics gathering for the agent
Attributes
metric_rules[RW]
Public Class Methods
new()
click to toggle source
# File lib/one_apm/collector/containers/stats_engine.rb, line 21 def initialize @stats_lock = Mutex.new @stats_hash = StatsHash.new @metric_rules = OneApm::Support::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/one_apm/collector/containers/stats_engine.rb, line 29 def with_stats_lock @stats_lock.synchronize { yield } end