PHP Класс DebugKit\DebugMemory

Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_points array An array of recorded memory use points.

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

Метод Описание
clear ( ) : void Clear out any existing memory points
getAll ( boolean $clear = false ) : array Get all the stored memory points
getCurrent ( ) : integer Get current memory usage
getPeak ( ) : integer Get peak memory use
record ( string $message = null ) : boolean Stores a memory point in the internal tracker.

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

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

Clear out any existing memory points
public static clear ( ) : void
Результат void

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

Get all the stored memory points
public static getAll ( boolean $clear = false ) : array
$clear boolean Whether you want to clear the memory points as well. Defaults to false.
Результат array Array of memory marks stored so far.

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

Get current memory usage
public static getCurrent ( ) : integer
Результат integer number of bytes ram currently in use. 0 if memory_get_usage() is not available.

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

Get peak memory use
public static getPeak ( ) : integer
Результат integer peak memory use (in bytes). Returns 0 if memory_get_peak_usage() is not available

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

Takes a optional message name which can be used to identify the memory point. If no message is supplied a debug_backtrace will be done to identify the memory point.
public static record ( string $message = null ) : boolean
$message string Message to identify this memory point.
Результат boolean

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

$_points защищенное статическое свойство

An array of recorded memory use points.
protected static array $_points
Результат array