PHP Interface PhpBench\Benchmark\ExecutorInterface

Inheritance: extends PhpBench\Registry\RegistrableInterface
ファイルを表示 Open project: dantleech/phpbench Interface Usage Examples

Public Methods

Method Description
execute ( SubjectMetadata $subjectMetadata, Iteration $iteration, Config $config ) : ResultCollection Execute the benchmark and return the result.
executeMethods ( BenchmarkMetadata $benchmark, array $methods ) Execute arbitrary methods.

Method Details

execute() public method

NOTE: It is currently not, and probably never will be entirely necessary to pass the Iteration, as it contains no information other than a reference to the Variant that could be useful here. The Variant in its turn is only currently used to get the ParameterSet, but is likely more useful that the Iteration.
public execute ( SubjectMetadata $subjectMetadata, Iteration $iteration, Config $config ) : ResultCollection
$subjectMetadata PhpBench\Benchmark\Metadata\SubjectMetadata
$iteration PhpBench\Model\Iteration
$config PhpBench\Registry\Config
return ResultCollection

executeMethods() public method

This should be called based on the value of @BeforeClassMethods and @AfterClassMethods and used to establish some persistent state. Methods called here cannot establish a runtime state.
public executeMethods ( BenchmarkMetadata $benchmark, array $methods )
$benchmark PhpBench\Benchmark\Metadata\BenchmarkMetadata
$methods array