Class: Testbot::Runner::CPU
- Inherits:
-
Object
- Object
- Testbot::Runner::CPU
- Defined in:
- lib/runner/runner.rb
Class Method Summary collapse
Class Method Details
.count ⇒ Object
16 17 18 19 20 21 22 23 |
# File 'lib/runner/runner.rb', line 16 def self.count case RUBY_PLATFORM when /darwin/ `sysctl machdep.cpu.core_count | awk '{ print $2 }'`.to_i when /linux/ `cat /proc/cpuinfo | grep processor | wc -l`.to_i end end |