Class: Ring::SQA::Graphite

Inherits:
Object
  • Object
show all
Defined in:
lib/ring/sqa/graphite.rb

Constant Summary collapse

ROOT =
"nlnog.ring_sqa.#{CFG.afi}"

Instance Method Summary collapse

Instance Method Details

#add(records) ⇒ Object



9
10
11
12
13
14
15
16
17
18
19
# File 'lib/ring/sqa/graphite.rb', line 9

def add records
  records.each do |record|
    hash = {
     "#{ROOT}.#{record.peer}.state" => record.result
    }
    if record.result == 'success'
      hash["#{ROOT}.#{record.peer}.latency"] = record.latency
    end
    @client.metrics hash, record.time
  end
end