PHP Class PhpBench\Benchmark\Executor\BaseExecutor
The executor bundles both the methods for executing before and after and the
benchmark iteration executor.
The standard use case for an Executor is to execute or obtain the iteration
measurements in a different way (e.g. xdebug, blackfire), the executeMethods logic
has nothing to do with this and so this awkward base class is required.
To be refactored...
Show file
Open project: dantleech/phpbench
Class Usage Examples
Public Methods
Method |
Description |
|
__construct ( Launcher $launcher ) |
|
|
execute ( SubjectMetadata $subjectMetadata, Iteration $iteration, Config $config ) |
|
|
executeMethods ( BenchmarkMetadata $benchmark, array $methods ) |
|
|
Protected Methods
Method |
Description |
|
launch ( Payload $payload, Iteration $iteration, Config $config ) : ResultCollection |
Launch the payload. This method has to return the ResultCollection. |
|
Method Details
__construct()
public method
public __construct ( Launcher $launcher ) |
$launcher |
PhpBench\Benchmark\Remote\Launcher |
|
public execute ( SubjectMetadata $subjectMetadata, Iteration $iteration, Config $config ) |
$subjectMetadata |
PhpBench\Benchmark\Metadata\SubjectMetadata |
|
$iteration |
PhpBench\Model\Iteration |
|
$config |
PhpBench\Registry\Config |
|
executeMethods()
public method
public executeMethods ( BenchmarkMetadata $benchmark, array $methods ) |
$benchmark |
PhpBench\Benchmark\Metadata\BenchmarkMetadata |
|
$methods |
array |
|
launch()
abstract protected method
Launch the payload. This method has to return the ResultCollection.
abstract protected launch ( Payload $payload, Iteration $iteration, Config $config ) : ResultCollection |
$payload |
PhpBench\Benchmark\Remote\Payload |
|
$iteration |
PhpBench\Model\Iteration |
|
$config |
PhpBench\Registry\Config |
|
return |
ResultCollection |
|