[ Index ]

krapohl.info

title

Body

[close]

/pnincludes/Benchmark/ -> Timer.php (summary)

(no description)

File Size: 142 lines (4 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Benchmark_Timer:: (5 methods):
  start()
  stop()
  setMarker()
  timeElapsed()
  getProfiling()


Class: Benchmark_Timer  - X-Ref

Benchmark::Timer

Purpose:

Timing Script Execution, Generating Profiling Information

Example:

$timer = new Benchmark_Timer;

$timer->start();
$timer->setMarker('Marker 1');
$timer->stop();

$profiling = $timer->getProfiling();

start()   X-Ref
Set "Start" marker.


stop()   X-Ref
Set "Stop" marker.


setMarker($name)   X-Ref
Set marker.

param: string  name of the marker to be set

timeElapsed($start = 'Start', $end = 'Stop')   X-Ref
Returns the time elapsed betweens two markers.

param: string  $start        start marker, defaults to "Start"
param: string  $end          end marker, defaults to "Stop"
return: double  $time_elapsed time elapsed between $start and $end

getProfiling()   X-Ref
Returns profiling information.

$profiling[x]['name']  = name of marker x
$profiling[x]['time']  = time index of marker x
$profiling[x]['diff']  = execution time from marker x-1 to this marker x
$profiling[x]['total'] = total execution time up to marker x

return: array $profiling



Generated: Wed Feb 16 22:40:07 2005 Cross-referenced by PHPXref 0.6