Class: Fluent::LibratoMetricsOutput::SumAggregator

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

Overview

sum(value) aggregator

Instance Method Summary collapse

Constructor Details

#initializeSumAggregator

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

#getObject



160
161
162
# File 'lib/fluent/plugin/out_librato_metrics.rb', line 160

def get
  @value
end