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



208
209
210
# File 'lib/fluent/plugin/out_metricsense.rb', line 208

def initialize
  @value = 0
end

Instance Attribute Details

#valueObject (readonly)

Returns the value of attribute value.



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

def value
  @value
end

Instance Method Details

#add(value) ⇒ Object



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

def add(value)
  @value += 1
end

#modeObject



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

def mode
  UpdateMode::ADD
end

#normalized_value(n) ⇒ Object



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

def normalized_value(n)
  @value
end