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

Attributes inherited from Base

#under_plugin_development

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?, #plugin_root_dir

Methods inherited from Base

#after_shutdown, #after_shutdown?, #after_start, #after_started?, #before_shutdown, #before_shutdown?, #close, #closed?, #configured?, #context_router, #context_router=, #fluentd_worker_id, #has_router?, #inspect, #plugin_root_dir, #shutdown?, #started?, #stop, #stopped?, #string_safe_encoding, #terminate, #terminated?

Methods included from SystemConfig::Mixin

#system_config, #system_config_override

Methods included from Configurable

#config, #configure_proxy_generate, #configured_section_create, included, lookup_type, register_type

Constructor Details

#initializeGCStatInput

Returns a new instance of GCStatInput.



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

#multi_workers_ready?Boolean

Returns:

  • (Boolean)


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

def multi_workers_ready?
  true
end

#on_timerObject



50
51
52
53
54
# File 'lib/fluent/plugin/in_gc_stat.rb', line 50

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

#shutdownObject



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

def shutdown
  super
end

#startObject



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

def start
  super

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