Class: Fluent::LibratoMetricsOutput::SumAggregator
- Inherits:
-
Object
- Object
- Fluent::LibratoMetricsOutput::SumAggregator
- Defined in:
- lib/fluent/plugin/out_librato_metrics.rb
Overview
sum(value) aggregator
Instance Method Summary collapse
- #add(value) ⇒ Object
- #get ⇒ Object
-
#initialize ⇒ SumAggregator
constructor
A new instance of SumAggregator.
Constructor Details
#initialize ⇒ SumAggregator
Returns a new instance of SumAggregator.
152 153 154 |
# File 'lib/fluent/plugin/out_librato_metrics.rb', line 152 def initialize @value = 0 end |
Instance Method Details
#add(value) ⇒ Object
156 157 158 |
# File 'lib/fluent/plugin/out_librato_metrics.rb', line 156 def add(value) @value += value end |
#get ⇒ Object
160 161 162 |
# File 'lib/fluent/plugin/out_librato_metrics.rb', line 160 def get @value end |