Class: Rack::Jsonz::CPU

Inherits:
Metric
  • Object
show all
Defined in:
lib/rack/jsonz/cpu.rb

Instance Method Summary collapse

Methods inherited from Metric

#each_metric

Instance Method Details

#metric_groupObject



16
17
18
# File 'lib/rack/jsonz/cpu.rb', line 16

def metric_group
  "cpu"
end

#metricsObject



9
10
11
12
13
14
# File 'lib/rack/jsonz/cpu.rb', line 9

def metrics
  return {
    :count => System::CPU.count.to_f,
    :load => Usagewatch.uw_load.to_f,
  }
end