Sha256: ad17426bad585e13091a2bc435b7fed64feeb74efa8646a2a82ad05d5ef48d53
Contents?: true
Size: 904 Bytes
Versions: 29
Compression:
Stored size: 904 Bytes
Contents
# encoding: utf-8 require "logstash/instrument/periodic_poller/os" require "logstash/instrument/periodic_poller/jvm" require "logstash/instrument/periodic_poller/pq" module LogStash module Instrument # Each PeriodPoller manager his own thread to do the poller # of the stats, this class encapsulate the starting and stopping of the poller # if the unique timer uses too much resource we can refactor this behavior here. class PeriodicPollers attr_reader :metric def initialize(metric, queue_type, pipelines) @metric = metric @periodic_pollers = [PeriodicPoller::Os.new(metric), PeriodicPoller::JVM.new(metric), PeriodicPoller::PersistentQueue.new(metric, queue_type, pipelines)] end def start @periodic_pollers.map(&:start) end def stop @periodic_pollers.map(&:stop) end end end; end
Version data entries
29 entries across 28 versions & 5 rubygems