PhpBrew\Machine::detectProcessorNumberByNproc PHP Method

detectProcessorNumberByNproc() protected method

    protected function detectProcessorNumberByNproc()
    {
        if (Utils::findBin('nproc')) {
            $process = new Process('nproc');
            $process->run();
            $this->processorNumber = intval($process->getOutput());
            return $this->processorNumber;
        }
        return;
    }

Usage Example

Example #1
0
 public function detectProcessorNumberByNproc()
 {
     return parent::detectProcessorNumberByNproc();
 }