Module: Fluent::MeasureTimable
- Defined in:
- lib/fluent/plugin/in_measure_time.rb
Instance Attribute Summary collapse
-
#measure_time ⇒ Object
readonly
Returns the value of attribute measure_time.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#measure_time ⇒ Object (readonly)
Returns the value of attribute measure_time.
21 22 23 |
# File 'lib/fluent/plugin/in_measure_time.rb', line 21 def measure_time @measure_time end |
Class Method Details
.included(klass) ⇒ Object
14 15 16 17 18 19 |
# File 'lib/fluent/plugin/in_measure_time.rb', line 14 def self.included(klass) unless klass.method_defined?(:configure_without_measure_time) klass.__send__(:alias_method, :configure_without_measure_time, :configure) klass.__send__(:alias_method, :configure, :configure_with_measure_time) end end |
Instance Method Details
#configure_with_measure_time(conf) ⇒ Object
23 24 25 26 27 28 29 |
# File 'lib/fluent/plugin/in_measure_time.rb', line 23 def configure_with_measure_time(conf) configure_without_measure_time(conf) if element = conf.elements.select { |element| element.name == 'measure_time' }.first @measure_time = MeasureTime.new(self, log) @measure_time.configure(element) end end |