Class: Fluent::Plugin::GCStatInput

Inherits:
Input
  • Object
show all
Defined in:
lib/fluent/plugin/in_gc_stat.rb

Constant Summary

Constants included from Configurable

Configurable::CONFIG_TYPE_REGISTRY

Instance Attribute Summary

Attributes included from Fluent::PluginLoggerMixin

#log

Instance Method Summary collapse

Methods included from Fluent::PluginHelper::Mixin

included

Methods included from Fluent::PluginLoggerMixin

included, #terminate

Methods included from Fluent::PluginId

#plugin_id, #plugin_id_configured?, #plugin_id_for_test?

Methods inherited from Base

#after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #close, #closed?, #configured?, #has_router?, #inspect, #shutdown?, #started?, #stop, #stopped?, #terminate, #terminated?

Methods included from SystemConfig::Mixin

#system_config, #system_config_override

Methods included from Configurable

#config, included, lookup_type, register_type

Constructor Details

#initializeGCStatInput



25
26
27
# File 'lib/fluent/plugin/in_gc_stat.rb', line 25

def initialize
  super
end

Instance Method Details

#configure(conf) ⇒ Object



32
33
34
# File 'lib/fluent/plugin/in_gc_stat.rb', line 32

def configure(conf)
  super
end

#on_timerObject



46
47
48
49
50
# File 'lib/fluent/plugin/in_gc_stat.rb', line 46

def on_timer
  now = Fluent::EventTime.now
  record = GC.stat
  router.emit(@tag, now, record)
end

#shutdownObject



42
43
44
# File 'lib/fluent/plugin/in_gc_stat.rb', line 42

def shutdown
  super
end

#startObject



36
37
38
39
40
# File 'lib/fluent/plugin/in_gc_stat.rb', line 36

def start
  super

  timer_execute(:in_gc_stat, @emit_interval, &method(:on_timer))
end