Elgg  Version 2.3
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
Elgg\Profiler Class Reference

Analyzes duration of functions, queries, and processes. More...

Public Member Functions

 buildTree (Timer $timer)
 Return a tree of time periods from a Timer. More...
 
 flattenTree (array &$list=[], array $tree, $prefix= '')
 Turn the tree of times into a sorted list. More...
 
 formatTree (array $tree)
 Nicely format the elapsed time values. More...
 

Static Public Member Functions

static handlePageOutput ($hook, $type, $html, $params)
 Append a SCRIPT element to the page output. More...
 

Public Attributes

 $percentage_format = "%01.2f"
 
 $duration_format = "%01.6f"
 
 $minimum_percentage = 0.2
 

Detailed Description

Analyzes duration of functions, queries, and processes.

private

Definition at line 9 of file Profiler.php.

Member Function Documentation

Elgg\Profiler::buildTree ( Timer  $timer)

Return a tree of time periods from a Timer.

Parameters
Timer$timerTimer object
Returns
array

Definition at line 26 of file Profiler.php.

Elgg\Profiler::flattenTree ( array &  $list = [],
array  $tree,
  $prefix = '' 
)

Turn the tree of times into a sorted list.

Parameters
array&$listOutput list of times to populate
array$treeResult of buildTree()
string$prefixPrefix of period string. Leave empty.
Returns
void

Definition at line 48 of file Profiler.php.

Elgg\Profiler::formatTree ( array  $tree)

Nicely format the elapsed time values.

Parameters
array$treeResult of buildTree()
Returns
array

Definition at line 76 of file Profiler.php.

static Elgg\Profiler::handlePageOutput (   $hook,
  $type,
  $html,
  $params 
)
static

Append a SCRIPT element to the page output.

Parameters
string$hook"output"
string$type"page"
string$htmlFull page HTML
array$paramsHook params
Returns
string

Definition at line 97 of file Profiler.php.

Member Data Documentation

Elgg\Profiler::$duration_format = "%01.6f"

Definition at line 12 of file Profiler.php.

Elgg\Profiler::$minimum_percentage = 0.2

Definition at line 13 of file Profiler.php.

Elgg\Profiler::$percentage_format = "%01.2f"

Definition at line 11 of file Profiler.php.


The documentation for this class was generated from the following file: