# File lib/fluent/plugin/in_gc_stat.rb, line 25 def initialize super end
# File lib/fluent/plugin/in_gc_stat.rb, line 48 def configure(conf) super end
# File lib/fluent/plugin/in_gc_stat.rb, line 72 def on_timer now = Engine.now record = GC.stat router.emit(@tag, now, record) end
# File lib/fluent/plugin/in_gc_stat.rb, line 65 def run @loop.run rescue log.error "unexpected error", error: $!.to_s log.error_backtrace end
# File lib/fluent/plugin/in_gc_stat.rb, line 59 def shutdown @loop.watchers.each {|w| w.detach } @loop.stop @thread.join end
# File lib/fluent/plugin/in_gc_stat.rb, line 52 def start @loop = Coolio::Loop.new @timer = TimerWatcher.new(@emit_interval, true, log, &method(:on_timer)) @loop.attach(@timer) @thread = Thread.new(&method(:run)) end