class Profiler (View source)

deprecated 4.0 The Profiler class is deprecated, use third party tools like XHProf instead

Execution time profiler.

Properties

$description
$startTime
$endTime
$initTime
$cur_timer
$stack
$trail
$trace
$count
$running

Methods

__construct($output_enabled = false, $trace_enabled = false)

Initialise the timer. with the current micro time

static 
init()

No description

static 
mark($name, $level2 = "", $desc = "")

No description

static 
unmark($name, $level2 = "", $desc = "")

No description

static 
show($showTrace = false)

No description

startTimer($name, $desc = "")

Start an individual timer This will pause the running timer and place it on a stack.

stopTimer($name)

Stop an individual timer Restart the timer that was running before this one

elapsedTime($name)

measure the elapsed time of a timer without stoping the timer if it is still running

elapsedOverall()

Measure the elapsed time since the profile class was initialised

printTimers($enabled = false)

print out a log of all the timers that were registered

printTrace($enabled = false)

No description

getMicroTime()

Get the current time as accuratly as possible

__resumeTimer($name)

resume an individual timer

__suspendTimer($name)

suspend an individual timer

Details

__construct($output_enabled = false, $trace_enabled = false)

Initialise the timer. with the current micro time

Parameters

$output_enabled
$trace_enabled

static init()

static mark($name, $level2 = "", $desc = "")

Parameters

$name
$level2
$desc

static unmark($name, $level2 = "", $desc = "")

Parameters

$name
$level2
$desc

static show($showTrace = false)

Parameters

$showTrace

startTimer($name, $desc = "")

Start an individual timer This will pause the running timer and place it on a stack.

@param string $name name of the timer

Parameters

$name
$desc

stopTimer($name)

Stop an individual timer Restart the timer that was running before this one

@param string $name name of the timer

Parameters

$name

elapsedTime($name)

measure the elapsed time of a timer without stoping the timer if it is still running

Parameters

$name

elapsedOverall()

Measure the elapsed time since the profile class was initialised

printTimers($enabled = false)

print out a log of all the timers that were registered

Parameters

$enabled

printTrace($enabled = false)

Parameters

$enabled

getMicroTime()

Get the current time as accuratly as possible

__resumeTimer($name)

resume an individual timer

Parameters

$name

__suspendTimer($name)

suspend an individual timer

Parameters

$name