Benchmark Helper

De ZanPHP
core/helpers/helper.benchmark.php

The Helper BenchMark allows benchmarking testing over Applications.


Loading this Helper

This helper is loaded using the following code:

 $this->helper("benchmark");

The following functions are available:


benchMarkStart()

Return: @void;

This function sets the Benchmark Start Time. Example:

 benchMarkStart();


benchMarkEnd()

Return: @float;

This function returns the Benchmark Final Time. Example:

 benchMarkStart(); 
 
 $bar = 0; 
 for($foo=1;$foo<=1000000;$foo++) { 
    ++$bar; 
 } 
 
 usleep(1000000); 
 //This function Delay execute time for 1sec = 1'000,000 microsec (1microsec = 0.000001 sec)
 
 print benchMarkEnd();
 //Output a Float Value: 1.0910620689392. This value might vary.

Es.png Ayudante Benchmark

Left.png Autoload Helper Browser Helper Right.png

Herramientas personales