|
|
File: c:/www/apache/doc2//pear/Benchmark/Timer.php
PEAR 2000/12/03 -
Benchmark_Timer
Benchmark_Timer
Benchmark::Timer
|
public class Benchmark_Timer
Benchmark::Timer
Purpose:Timing Script Execution, Generating Profiling InformationExample:$timer = new Benchmark_Timer;$timer->start();$timer->set_marker( "Marker 1" );$timer->stop();$profiling = $timer->get_profiling();
|
|
Direct known subclasses: Benchmark_Iterate
|
|
|
Public Field Summary |
array |
$markersContains the markers |
|
Public Method Details |
start |
public void start( )
|
|
Set "Start" marker.
|
Returns |
void |
See Also |
set_marker(), stop() |
|
stop |
public void stop( )
|
|
Set "Stop" marker.
|
Returns |
void |
See Also |
set_marker(), start() |
|
set_marker |
public void set_marker( string $name )
|
|
Set marker.
|
Parameter |
|
string |
$name |
|
|
of the marker to be set |
|
Returns |
void |
See Also |
start(), stop() |
|
time_elapsed |
public double time_elapsed( [ string $start, string $end ] )
|
|
Returns the time elapsed betweens two markers.
|
Parameter |
|
string |
$start |
= >>"Start"<< |
|
start marker, defaults to "Start" |
|
|
string |
$end |
= >>"Stop"<< |
|
end marker, defaults to "Stop" |
|
Returns |
double $time_elapsed time elapsed between $start and $end |
|
get_profiling |
public array get_profiling( )
|
|
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
|
Returns |
array $profiling |
|
|
Public Field Details |
$markers |
public array $markers
>>array() <<
Contains the markers
|
|
|
|
|
PHPDoc 1.0beta |