Class: Fluent::MetricSenseOutput::MaxUpdater
- Inherits:
-
Object
- Object
- Fluent::MetricSenseOutput::MaxUpdater
- Defined in:
- lib/fluent/plugin/out_metricsense.rb
Direct Known Subclasses
Instance Attribute Summary collapse
-
#value ⇒ Object
readonly
Returns the value of attribute value.
Instance Method Summary collapse
- #add(value) ⇒ Object
-
#initialize ⇒ MaxUpdater
constructor
A new instance of MaxUpdater.
- #mode ⇒ Object
- #normalized_value(n) ⇒ Object
Constructor Details
#initialize ⇒ MaxUpdater
Returns a new instance of MaxUpdater.
227 228 229 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 227 def initialize @value = 0 end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
230 231 232 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 230 def value @value end |
Instance Method Details
#add(value) ⇒ Object
236 237 238 239 240 241 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 236 def add(value) if @value < value @value = value end @value end |
#mode ⇒ Object
243 244 245 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 243 def mode UpdateMode::MAX end |
#normalized_value(n) ⇒ Object
232 233 234 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 232 def normalized_value(n) @value end |