Class: HealthMode::LoadMetric

Inherits:
Metric
  • Object
show all
Defined in:
lib/metrics/load_metric.rb

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.fifteen_minutes_load_averageObject

Returns the value of attribute fifteen_minutes_load_average.



4
5
6
# File 'lib/metrics/load_metric.rb', line 4

def fifteen_minutes_load_average
  @fifteen_minutes_load_average
end

.five_minutes_load_averageObject

Returns the value of attribute five_minutes_load_average.



4
5
6
# File 'lib/metrics/load_metric.rb', line 4

def five_minutes_load_average
  @five_minutes_load_average
end

.one_minute_load_averageObject

Returns the value of attribute one_minute_load_average.



4
5
6
# File 'lib/metrics/load_metric.rb', line 4

def one_minute_load_average
  @one_minute_load_average
end

.system_metricsObject

Returns the value of attribute system_metrics.



4
5
6
# File 'lib/metrics/load_metric.rb', line 4

def system_metrics
  @system_metrics
end

Class Method Details

.current_stateObject



9
10
11
12
13
14
15
16
# File 'lib/metrics/load_metric.rb', line 9

def current_state
  refresh_state
  {
    "load_one" => @one_minute_load_average,
    "load_five" => @five_minutes_load_average,
    "load_fifteen" => @fifteen_minutes_load_average
  }
end