Class: SourceMonitor::Configuration::HealthSettings

Inherits:
Object
  • Object
show all
Defined in:
lib/source_monitor/configuration/health_settings.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeHealthSettings

Returns a new instance of HealthSettings.



12
13
14
# File 'lib/source_monitor/configuration/health_settings.rb', line 12

def initialize
  reset!
end

Instance Attribute Details

#auto_pause_cooldown_minutesObject

Returns the value of attribute auto_pause_cooldown_minutes.



6
7
8
# File 'lib/source_monitor/configuration/health_settings.rb', line 6

def auto_pause_cooldown_minutes
  @auto_pause_cooldown_minutes
end

#auto_pause_thresholdObject

Returns the value of attribute auto_pause_threshold.



6
7
8
# File 'lib/source_monitor/configuration/health_settings.rb', line 6

def auto_pause_threshold
  @auto_pause_threshold
end

#auto_resume_thresholdObject

Returns the value of attribute auto_resume_threshold.



6
7
8
# File 'lib/source_monitor/configuration/health_settings.rb', line 6

def auto_resume_threshold
  @auto_resume_threshold
end

#healthy_thresholdObject

Returns the value of attribute healthy_threshold.



6
7
8
# File 'lib/source_monitor/configuration/health_settings.rb', line 6

def healthy_threshold
  @healthy_threshold
end

#window_sizeObject

Returns the value of attribute window_size.



6
7
8
# File 'lib/source_monitor/configuration/health_settings.rb', line 6

def window_size
  @window_size
end

Instance Method Details

#reset!Object



16
17
18
19
20
21
22
# File 'lib/source_monitor/configuration/health_settings.rb', line 16

def reset!
  @window_size = 20
  @healthy_threshold = 0.8
  @auto_pause_threshold = 0.2
  @auto_resume_threshold = 0.6
  @auto_pause_cooldown_minutes = 60
end