Class Benchmark_Timer

Description

Located in /libraries/pear/Benchmark/Timer.php (line 52)

PEAR
   |
   --Benchmark_Timer
Direct descendents
Class Description
 class Benchmark_Iterate Benchmark::Benchmark_Iterate
Variable Summary
 boolean $auto
 array $markers
 integer $strlen_max
Method Summary
 Benchmark_Timer Benchmark_Timer ([mixed $auto = false])
 void display ()
 void getOutput ()
 array getProfiling ()
 void setMarker (string $name)
 void start ()
 void stop ()
 double timeElapsed ([string $start = 'Start'], [string $end = 'Stop'])
Variables
boolean $auto = false (line 68)

Auto-start and stop timer

  • access: private
array $markers = array() (line 60)

Contains the markers

  • access: private
integer $strlen_max = 0 (line 76)

Max marker name length for non-html output

  • access: private
Methods
Constructor Benchmark_Timer (line 83)

Constructor, starts profiling recording

  • access: public
Benchmark_Timer Benchmark_Timer ([mixed $auto = false])
display (line 161)

Prints the information returned by getOutput

void display ()
getOutput (line 109)

Return formatted profiling information.

void getOutput ()
getProfiling (line 225)

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

  • access: public
array getProfiling ()
setMarker (line 193)

Set marker.

void setMarker (string $name)
  • string $name: name of the marker to be set
start (line 172)

Set "Start" marker.

void start ()
stop (line 182)

Set "Stop" marker.

void stop ()
timeElapsed (line 206)

Returns the time elapsed betweens two markers.

  • return: time elapsed between $start and $end
  • access: public
double timeElapsed ([string $start = 'Start'], [string $end = 'Stop'])
  • string $start: start marker, defaults to "Start"
  • string $end: end marker, defaults to "Stop"
_Benchmark_Timer (line 96)

Destructor, stops profiling recording

  • access: private
void _Benchmark_Timer ()

Documentation generated on Fri, 3 Dec 2004 12:27:57 +0000 by phpDocumentor 1.3.0RC3