Class: Gitlab::Memory::Watchdog::Configuration
- Inherits:
-
Object
- Object
- Gitlab::Memory::Watchdog::Configuration
- Defined in:
- lib/gitlab/memory/watchdog/configuration.rb
Defined Under Namespace
Classes: MonitorStack
Constant Summary collapse
- DEFAULT_SLEEP_TIME_SECONDS =
60
Instance Attribute Summary collapse
- #event_reporter ⇒ Object
- #handler ⇒ Object
-
#sleep_time_seconds ⇒ Object
Used to control the frequency with which the watchdog will wake up and poll the GC.
Instance Method Summary collapse
Instance Attribute Details
#event_reporter ⇒ Object
54 55 56 |
# File 'lib/gitlab/memory/watchdog/configuration.rb', line 54 def event_reporter @event_reporter ||= EventReporter.new end |
#handler ⇒ Object
50 51 52 |
# File 'lib/gitlab/memory/watchdog/configuration.rb', line 50 def handler @handler ||= Handlers::NullHandler.instance end |
#sleep_time_seconds ⇒ Object
Used to control the frequency with which the watchdog will wake up and poll the GC.
59 60 61 |
# File 'lib/gitlab/memory/watchdog/configuration.rb', line 59 def sleep_time_seconds @sleep_time_seconds ||= DEFAULT_SLEEP_TIME_SECONDS end |
Instance Method Details
#monitors {|@monitor_stack| ... } ⇒ Object
44 45 46 47 48 |
# File 'lib/gitlab/memory/watchdog/configuration.rb', line 44 def monitors @monitor_stack ||= MonitorStack.new yield @monitor_stack if block_given? @monitor_stack end |