Sha256: fd34243423575dd5eb102e0113d9ef47ed3d1cbbbce9096b56ddfa10f40b220f
Contents?: true
Size: 656 Bytes
Versions: 10
Compression:
Stored size: 656 Bytes
Contents
# encoding: utf-8 require 'ting_yun/agent/collector/stats_engine/stats_hash' require 'ting_yun/agent/collector/stats_engine/metric_stats' module TingYun module Agent module Collector # This class handles all the statistics gathering for the agent class StatsEngine include MetricStats def initialize @stats_lock = Mutex.new @stats_hash = StatsHash.new end # All access to the @stats_hash ivar should be funnelled through this # method to ensure thread-safety. def with_stats_lock @stats_lock.synchronize { yield } end end end end end
Version data entries
10 entries across 10 versions & 1 rubygems