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
12 13 14 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 12 def fifty_percent [1, (maximum * 0.5)].max.floor end |
#max_minus_one ⇒ Object
24 25 26 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 24 def max_minus_one [1, (maximum - 1)].max.floor end |
#max_minus_two ⇒ Object
28 29 30 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 28 def max_minus_two [1, (maximum - 2)].max.floor end |
#maximum ⇒ Object
8 9 10 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 8 def maximum LogStash::Config::Defaults.cpu_cores end |
#seventy_five_percent ⇒ Object
16 17 18 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 16 def seventy_five_percent [1, (maximum * 0.75)].max.floor end |
#twenty_five_percent ⇒ Object
20 21 22 |
# File 'lib/logstash/config/cpu_core_strategy.rb', line 20 def twenty_five_percent [1, (maximum * 0.25)].max.floor end |