PHP Class PhpBench\Benchmark\BaselineManager

Baseline benchmarks are standard microbenchmarks which can be used to determine the "baseline" performance of the test platform. These measurements can be used to establish a baseline speed for the system, or to provide counterweights to iteration measurements (and so attempt to cancel out any fluctuations of the test platforms performance).
Exibir arquivo Open project: dantleech/phpbench Class Usage Examples

Public Methods

Method Description
addBaselineCallable ( $name, $callable ) Add a baseline callable. The callable can be any callable accepted by call_user_func.
benchmark ( $name, $revs ) : float Return mean time taken to execute the named baseline callable in microseconds.

Method Details

addBaselineCallable() public method

Throws an invalid argument exception if the name has already been registered.
public addBaselineCallable ( $name, $callable )

benchmark() public method

Return mean time taken to execute the named baseline callable in microseconds.
public benchmark ( $name, $revs ) : float
return float