Module: PumaAutoTune
- Extended by:
- PumaAutoTune
- Included in:
- PumaAutoTune
- Defined in:
- lib/puma_auto_tune.rb,
lib/puma_auto_tune.rb,
lib/puma_auto_tune/hook.rb,
lib/puma_auto_tune/master.rb,
lib/puma_auto_tune/memory.rb,
lib/puma_auto_tune/worker.rb,
lib/puma_auto_tune/version.rb
Defined Under Namespace
Classes: Hook, Master, Memory, Worker
Constant Summary collapse
Instance Attribute Summary collapse
-
#frequency ⇒ Object
Returns the value of attribute frequency.
-
#max_workers ⇒ Object
Returns the value of attribute max_workers.
-
#ram ⇒ Object
Returns the value of attribute ram.
-
#reap_duration ⇒ Object
Returns the value of attribute reap_duration.
Class Method Summary collapse
Instance Method Summary collapse
Instance Attribute Details
#frequency ⇒ Object
Returns the value of attribute frequency.
17 18 19 |
# File 'lib/puma_auto_tune.rb', line 17 def frequency @frequency end |
#max_workers ⇒ Object
Returns the value of attribute max_workers.
17 18 19 |
# File 'lib/puma_auto_tune.rb', line 17 def max_workers @max_workers end |
#ram ⇒ Object
Returns the value of attribute ram.
17 18 19 |
# File 'lib/puma_auto_tune.rb', line 17 def ram @ram end |
#reap_duration ⇒ Object
Returns the value of attribute reap_duration.
17 18 19 |
# File 'lib/puma_auto_tune.rb', line 17 def reap_duration @reap_duration end |
Class Method Details
.config {|_self| ... } ⇒ Object
24 25 26 27 |
# File 'lib/puma_auto_tune.rb', line 24 def self.config yield self self end |
.hooks(name = nil, resource = nil, &block) ⇒ Object
29 30 31 32 33 34 35 36 |
# File 'lib/puma_auto_tune.rb', line 29 def self.hooks(name = nil, resource = nil, &block) @hooks ||= {} return @hooks if name.nil? resource ||= RESOURCES[name] || raise("no default resource specified for #{name.inspect}") @hooks[name] ||= Hook.new(resource) block.call(@hooks[name]) if block @hooks[name] end |
Instance Method Details
#start ⇒ Object
38 39 40 |
# File 'lib/puma_auto_tune.rb', line 38 def start hooks.map {|name, hook| hook.auto_cycle} end |