PHP Class DebugKit\Shell\BenchmarkShell

Provides basic benchmarking of application requests functionally similar to Apache AB
Inheritance: extends Cake\Console\Shell
Datei anzeigen Open project: cakephp/debug_kit

Public Methods

Method Description
getOptionParser ( ) : Cake\Console\ConsoleOptionParser Get option parser.
main ( ) : void Main execution of shell

Protected Methods

Method Description
_deviation ( array $times, boolean $sample = true ) : float Calculate the standard deviation.
_results ( array $times ) : void Prints calculated results
_variance ( array $times, boolean $sample = true ) : float One-pass, numerically stable calculation of population variance.

Method Details

_deviation() protected method

Calculate the standard deviation.
protected _deviation ( array $times, boolean $sample = true ) : float
$times array Array of values
$sample boolean ''
return float Standard deviation

_results() protected method

Prints calculated results
protected _results ( array $times ) : void
$times array Array of time values
return void

_variance() protected method

Donald E. Knuth (1998). The Art of Computer Programming, volume 2: Seminumerical Algorithms, 3rd edn., p. 232. Boston: Addison-Wesley.
protected _variance ( array $times, boolean $sample = true ) : float
$times array Array of values
$sample boolean If true, calculates an unbiased estimate of the population variance from a finite sample.
return float Variance

getOptionParser() public method

Get option parser.
public getOptionParser ( ) : Cake\Console\ConsoleOptionParser
return Cake\Console\ConsoleOptionParser

main() public method

Main execution of shell
public main ( ) : void
return void