class Fluent::Plugin::GCStatInput
Public Class Methods
new()
click to toggle source
Calls superclass method
Fluent::Plugin::Input::new
# File lib/fluent/plugin/in_gc_stat.rb, line 25 def initialize super @key_map = nil end
Public Instance Methods
configure(conf)
click to toggle source
Calls superclass method
Fluent::Plugin::Input#configure
# File lib/fluent/plugin/in_gc_stat.rb, line 34 def configure(conf) super unless @use_symbol_keys @key_map = {} GC.stat.each_key { |key| @key_map[key] = key.to_s } end end
multi_workers_ready?()
click to toggle source
# File lib/fluent/plugin/in_gc_stat.rb, line 45 def multi_workers_ready? true end
on_timer()
click to toggle source
# File lib/fluent/plugin/in_gc_stat.rb, line 59 def on_timer now = Fluent::EventTime.now record = GC.stat unless @use_symbol_keys new_record = {} record.each_pair { |k, v| new_record[@key_map[k]] = v } record = new_record end router.emit(@tag, now, record) end
shutdown()
click to toggle source
Calls superclass method
Fluent::Plugin::Base#shutdown
# File lib/fluent/plugin/in_gc_stat.rb, line 55 def shutdown super end
start()
click to toggle source
Calls superclass method
Fluent::Plugin::Base#start
# File lib/fluent/plugin/in_gc_stat.rb, line 49 def start super timer_execute(:in_gc_stat, @emit_interval, &method(:on_timer)) end