Documentation

NProcFinder extends ProcOpenBasedFinder
in package

FinalYes

The number of (logical) cores.

Tags
see
https://github.com/infection/infection/blob/fbd8c44/src/Resource/Processor/CpuCoresCountProvider.php#L69-L82
see
https://unix.stackexchange.com/questions/146051/number-of-processors-in-proc-cpuinfo

Table of Contents

Properties

$all  : bool
$executor  : ProcessExecutor

Methods

__construct()  : mixed
diagnose()  : string
Provides an explanation which may offer some insight as to what the finder will be able to find.
find()  : positive-int|null
Find the number of CPU cores. If it could not find it, returns null. The means used to find the cores are at the implementation discretion.
toString()  : string
getCommand()  : string

Properties

Methods

__construct()

public __construct([bool $all = true ][, ProcessExecutor|null $executor = null ]) : mixed
Parameters
$all : bool = true

If disabled will give the number of cores available for the current process only.

$executor : ProcessExecutor|null = null

diagnose()

Provides an explanation which may offer some insight as to what the finder will be able to find.

public diagnose() : string

This is practical to have an idea of what each finder will find collect information for the unit tests, since integration tests are quite complicated as dependent on complex infrastructures.

Return values
string

find()

Find the number of CPU cores. If it could not find it, returns null. The means used to find the cores are at the implementation discretion.

public find() : positive-int|null
Return values
positive-int|null

toString()

public toString() : string
Return values
string

getCommand()

protected getCommand() : string
Return values
string

        
On this page

Search results