class Fluent::GCStatInput
Public Class Methods
new()
click to toggle source
Calls superclass method
Fluent::Input.new
# File lib/fluent/plugin/in_gc_stat.rb, line 22 def initialize super end
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
Fluent::Input#configure
# File lib/fluent/plugin/in_gc_stat.rb, line 45 def configure(conf) super end
on_timer()
click to toggle source
# File lib/fluent/plugin/in_gc_stat.rb, line 69 def on_timer now = Engine.now record = GC.stat router.emit(@tag, now, record) end
run()
click to toggle source
# File lib/fluent/plugin/in_gc_stat.rb, line 62 def run @loop.run rescue log.error "unexpected error", :error=>$!.to_s log.error_backtrace end
shutdown()
click to toggle source
# File lib/fluent/plugin/in_gc_stat.rb, line 56 def shutdown @loop.watchers.each {|w| w.detach } @loop.stop @thread.join end
start()
click to toggle source
# File lib/fluent/plugin/in_gc_stat.rb, line 49 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