Analyzes duration of functions, queries, and processes.
More...
Analyzes duration of functions, queries, and processes.
Definition at line 13 of file Profiler.php.
Elgg\Debug\Profiler::__invoke |
( |
\Elgg\Event |
$event | ) |
|
Append a SCRIPT element to the page output.
- Parameters
-
\Elgg\Event | $event | 'output', 'page' |
- Returns
- string
Definition at line 33 of file Profiler.php.
Elgg\Debug\Profiler::analyzePeriod |
( |
|
$name, |
|
|
array |
$times |
|
) |
| |
|
protected |
Analyze a time period.
- Parameters
-
string | $name | Period name |
array | $times | Times |
- Returns
- false|array False if missing begin/end time
Definition at line 151 of file Profiler.php.
Elgg\Debug\Profiler::buildTree |
( |
Timer |
$timer | ) |
|
|
protected |
Return a tree of time periods from a Timer.
- Parameters
-
- Returns
- false|array
Definition at line 75 of file Profiler.php.
Elgg\Debug\Profiler::diffMicrotime |
( |
|
$start, |
|
|
|
$end |
|
) |
| |
|
protected |
Calculate a precise time difference.
- Parameters
-
float | $start | result of microtime(true) |
float | $end | result of microtime(true) |
- Returns
- float difference in seconds, calculated with minimum precision loss
Definition at line 255 of file Profiler.php.
Elgg\Debug\Profiler::findBeginTime |
( |
array |
$times | ) |
|
|
protected |
Get the microtime start time.
- Parameters
-
- Returns
- float|false
Definition at line 212 of file Profiler.php.
Elgg\Debug\Profiler::findEndTime |
( |
array |
$times | ) |
|
|
protected |
Get the microtime end time.
- Parameters
-
- Returns
- float|false
Definition at line 233 of file Profiler.php.
Elgg\Debug\Profiler::flattenTree |
( |
array & |
$list = [] , |
|
|
array |
$tree = [] , |
|
|
|
$prefix = '' |
|
) |
| |
|
protected |
Turn the tree of times into a sorted list.
- Parameters
-
array | $list | Output list of times to populate |
array | $tree | Result of buildTree() |
string | $prefix | Prefix of period string. Leave empty. |
- Returns
- void
Definition at line 98 of file Profiler.php.
Elgg\Debug\Profiler::formatTree |
( |
array |
$tree | ) |
|
|
protected |
Nicely format the elapsed time values.
- Parameters
-
- Returns
- array
Definition at line 130 of file Profiler.php.
Elgg\Debug\Profiler::$duration_format = '%01.6f' |
|
protected |
Elgg\Debug\Profiler::$minimum_percentage = 0.2 |
|
protected |
Elgg\Debug\Profiler::$percentage_format = '%01.2f' |
|
protected |
Elgg\Debug\Profiler::$total |
|
protected |
The documentation for this class was generated from the following file: