PHP Класс Elgg\Profiler

Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$duration_format
$minimum_percentage
$percentage_format

Открытые методы

Метод Описание
buildTree ( Timer $timer ) : array Return a tree of time periods from a Timer
flattenTree ( array &$list = [], array $tree, string $prefix = '' ) : void Turn the tree of times into a sorted list
formatTree ( array $tree ) : array Nicely format the elapsed time values
handlePageOutput ( string $hook, string $type, string $html, array $params ) : string Append a SCRIPT element to the page output

Приватные методы

Метод Описание
analyzePeriod ( string $name, array $times ) : array | boolean Analyze a time period
diffMicrotime ( string $start, string $end ) : float Calculate a precise time difference.
findBeginTime ( array $times ) : string | false Get the microtime start time
findEndTime ( array $times ) : string | false Get the microtime end time

Описание методов

buildTree() публичный Метод

Return a tree of time periods from a Timer
public buildTree ( Timer $timer ) : array
$timer Timer Timer object
Результат array

flattenTree() публичный Метод

Turn the tree of times into a sorted list
public flattenTree ( array &$list = [], array $tree, string $prefix = '' ) : void
$list array
$tree array Result of buildTree()
$prefix string Prefix of period string. Leave empty.
Результат void

formatTree() публичный Метод

Nicely format the elapsed time values
public formatTree ( array $tree ) : array
$tree array Result of buildTree()
Результат array

handlePageOutput() публичный статический Метод

Append a SCRIPT element to the page output
public static handlePageOutput ( string $hook, string $type, string $html, array $params ) : string
$hook string "output"
$type string "page"
$html string Full page HTML
$params array Hook params
Результат string

Описание свойств

$duration_format публичное свойство

public $duration_format

$minimum_percentage публичное свойство

public $minimum_percentage

$percentage_format публичное свойство

public $percentage_format