Sha256: a2b26a03e4515660fc28f74dd35568467daddf4a9cb96b7706b902395bf5ae68

Contents?: true

Size: 736 Bytes

Versions: 45

Compression:

Stored size: 736 Bytes

Contents

# encoding: utf-8
require "logstash/instrument/periodic_poller/os"
require "logstash/instrument/periodic_poller/jvm"

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)
      @metric = metric
      @periodic_pollers = [PeriodicPoller::Os.new(metric),
                          PeriodicPoller::JVM.new(metric)]
    end

    def start
      @periodic_pollers.map(&:start)
    end

    def stop
      @periodic_pollers.map(&:stop)
    end
  end
end; end

Version data entries

45 entries across 45 versions & 7 rubygems

Version Path
mrcooper-logstash-output-azuresearch-0.2.2 vendor/jruby/2.5.0/gems/logstash-core-5.0.0-java/lib/logstash/instrument/periodic_pollers.rb
logstash-input-fifo-0.9.1 vendor/bundle/jruby/1.9/gems/logstash-core-5.1.1.1-java/lib/logstash/instrument/periodic_pollers.rb
logstash-input-fifo-0.9.0 vendor/bundle/jruby/1.9/gems/logstash-core-5.1.1.1-java/lib/logstash/instrument/periodic_pollers.rb
logstash-input-salesforce-3.0.0 vendor/jruby/1.9/gems/logstash-core-5.1.1.1-java/lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.1.2-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.1.1.1-java lib/logstash/instrument/periodic_pollers.rb
ivanvc-logstash-input-s3-3.1.1.4 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/lib/logstash/instrument/periodic_pollers.rb
ivanvc-logstash-input-s3-3.1.1.3 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/lib/logstash/instrument/periodic_pollers.rb
ivanvc-logstash-input-s3-3.1.1.2 vendor/local/gems/logstash-core-5.1.2.snapshot1-java/lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.0.2-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.0.1-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.0.0-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.0.0.pre.rc1-java lib/logstash/instrument/periodic_pollers.rb
logstash-core-5.0.0.pre.beta1-java lib/logstash/instrument/periodic_pollers.rb
logstash-filter-delta-1.1.0 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-delta-1.0.1 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-base64-1.0.4 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-base64-1.0.3 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-delta-1.0.0 vendor/bundle/jruby/2.2.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/instrument/periodic_pollers.rb
logstash-filter-base64-1.0.2 vendor/bundle/jruby/2.3.0/gems/logstash-core-5.0.0.alpha6.snapshot5-java/lib/logstash/instrument/periodic_pollers.rb