Module: LogStash::Config::CpuCoreStrategy
- Extended by:
- CpuCoreStrategy
- Included in:
- CpuCoreStrategy
- Defined in:
- lib/logstash/config/cpu_core_strategy.rb
Instance Method Summary collapse
- #fifty_percent ⇒ Object
- #max_minus_one ⇒ Object
- #max_minus_two ⇒ Object
- #maximum ⇒ Object
- #seventy_five_percent ⇒ Object
- #twenty_five_percent ⇒ Object
Instance Method Details
#fifty_percent ⇒ Object
13 14 15 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 13 def fifty_percent [1, (maximum * 0.5)].max.floor end |
#max_minus_one ⇒ Object
25 26 27 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 25 def max_minus_one [1, (maximum - 1)].max.floor end |
#max_minus_two ⇒ Object
29 30 31 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 29 def max_minus_two [1, (maximum - 2)].max.floor end |
#maximum ⇒ Object
9 10 11 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 9 def maximum LogStash::Config::Defaults.cpu_cores end |
#seventy_five_percent ⇒ Object
17 18 19 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 17 def seventy_five_percent [1, (maximum * 0.75)].max.floor end |
#twenty_five_percent ⇒ Object
21 22 23 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 21 def twenty_five_percent [1, (maximum * 0.25)].max.floor end |