Method: ScoutApm::Instruments::Process::ProcessCpu#metrics

Defined in:
lib/scout_apm/instruments/process/process_cpu.rb

#metrics(timestamp, store) ⇒ Object



32
33
34
35
36
37
38
39
40
41
42
43
# File 'lib/scout_apm/instruments/process/process_cpu.rb', line 32

def metrics(timestamp, store)
  result = run
  if result
    meta = MetricMeta.new("#{metric_type}/#{metric_name}")
    stat = MetricStats.new(false)
    stat.update!(result)
    store.track!({ meta => stat }, :timestamp => timestamp)
  else
    {}
  end

end