PHP Класс CI_Benchmark, TastyIgniter

This class enables you to mark points and calculate the time difference between them. Memory consumption can also be displayed.
Автор: EllisLab Dev Team
Показать файл Открыть проект

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

Свойство Тип Описание
$marker array List of all benchmark markers

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

Метод Описание
elapsed_time ( string $point1 = '', string $point2 = '', integer $decimals = 4 ) : string Elapsed time
mark ( string $name ) : void Set a benchmark marker
memory_usage ( ) : string Memory Usage

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

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

Calculates the time difference between two marked points. If the first parameter is empty this function instead returns the {elapsed_time} pseudo-variable. This permits the full system execution time to be shown in a template. The output class will swap the real value for this variable.
public elapsed_time ( string $point1 = '', string $point2 = '', integer $decimals = 4 ) : string
$point1 string A particular marked point
$point2 string A particular marked point
$decimals integer Number of decimal places
Результат string Calculated elapsed time on success, an '{elapsed_string}' if $point1 is empty or an empty string if $point1 is not found.

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

Multiple calls to this function can be made so that several execution points can be timed.
public mark ( string $name ) : void
$name string Marker name
Результат void

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

Simply returns the {memory_usage} marker. This permits it to be put it anywhere in a template without the memory being calculated until the end. The output class will swap the real value for this variable.
public memory_usage ( ) : string
Результат string '{memory_usage}'

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

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

List of all benchmark markers
public array $marker
Результат array