Module: Scout::Realtime::Aggregator

Included in:
Cpu, Memory
Defined in:
lib/scout_realtime/lib/aggregator.rb

Instance Method Summary collapse

Instance Method Details

#update_historical_metrics(collector_response) ⇒ Object



2
3
4
5
6
7
# File 'lib/scout_realtime/lib/aggregator.rb', line 2

def update_historical_metrics(collector_response)
  self.class::FIELDS.keys.each do |field_name|
    historical_metrics[field_name] ||= RingBuffer.new(60)
    historical_metrics[field_name].push(collector_response[field_name])
  end
end