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.
230 231 232 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 230 def initialize @value = 0 end |
Instance Attribute Details
#value ⇒ Object (readonly)
Returns the value of attribute value.
233 234 235 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 233 def value @value end |
Instance Method Details
#add(value) ⇒ Object
239 240 241 242 243 244 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 239 def add(value) if @value < value @value = value end @value end |
#mode ⇒ Object
246 247 248 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 246 def mode UpdateMode::MAX end |
#normalized_value(n) ⇒ Object
235 236 237 |
# File 'lib/fluent/plugin/out_metricsense.rb', line 235 def normalized_value(n) @value end |