Class: Fluent::MetricSenseOutput::CountUpdater

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

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeCountUpdater

Returns a new instance of CountUpdater.



211
212
213
# File 'lib/fluent/plugin/out_metricsense.rb', line 211

def initialize
  @value = 0
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



214
215
216
# File 'lib/fluent/plugin/out_metricsense.rb', line 214

def value
  @value
end

Instance Method Details

#add(value) ⇒ Object



220
221
222
# File 'lib/fluent/plugin/out_metricsense.rb', line 220

def add(value)
  @value += 1
end

#modeObject



224
225
226
# File 'lib/fluent/plugin/out_metricsense.rb', line 224

def mode
  UpdateMode::ADD
end

#normalized_value(n) ⇒ Object



216
217
218
# File 'lib/fluent/plugin/out_metricsense.rb', line 216

def normalized_value(n)
  @value
end