Profile
in package
implements
IteratorAggregate, Serializable
FinalYes
Tags
Table of Contents
Interfaces
- IteratorAggregate
- Serializable
Constants
Properties
Methods
- __construct() : mixed
- addProfile() : void
- enter() : void
- Starts the profiling.
- getDuration() : float
- Returns the duration in microseconds.
- getIterator() : Traversable
- getMemoryUsage() : int
- Returns the memory usage in bytes.
- getName() : string
- getPeakMemoryUsage() : int
- Returns the peak memory usage in bytes.
- getProfiles() : array<string|int, Profile>
- getTemplate() : string
- getType() : string
- isBlock() : bool
- isMacro() : bool
- isRoot() : bool
- isTemplate() : bool
- leave() : void
- Stops the profiling.
- reset() : void
- serialize() : string
- unserialize() : void
Constants
BLOCK
public
mixed
BLOCK
= 'block'
MACRO
public
mixed
MACRO
= 'macro'
ROOT
public
mixed
ROOT
= 'ROOT'
TEMPLATE
public
mixed
TEMPLATE
= 'template'
Properties
$ends
private
mixed
$ends
= []
$name
private
mixed
$name
$profiles
private
mixed
$profiles
= []
$starts
private
mixed
$starts
= []
$template
private
mixed
$template
$type
private
mixed
$type
Methods
__construct()
public
__construct([string $template = 'main' ][, string $type = self::ROOT ][, string $name = 'main' ]) : mixed
Parameters
- $template : string = 'main'
- $type : string = self::ROOT
- $name : string = 'main'
addProfile()
public
addProfile(self $profile) : void
Parameters
- $profile : self
enter()
Starts the profiling.
public
enter() : void
getDuration()
Returns the duration in microseconds.
public
getDuration() : float
Return values
floatgetIterator()
public
getIterator() : Traversable
Return values
TraversablegetMemoryUsage()
Returns the memory usage in bytes.
public
getMemoryUsage() : int
Return values
intgetName()
public
getName() : string
Return values
stringgetPeakMemoryUsage()
Returns the peak memory usage in bytes.
public
getPeakMemoryUsage() : int
Return values
intgetProfiles()
public
getProfiles() : array<string|int, Profile>
Return values
array<string|int, Profile>getTemplate()
public
getTemplate() : string
Return values
stringgetType()
public
getType() : string
Return values
stringisBlock()
public
isBlock() : bool
Return values
boolisMacro()
public
isMacro() : bool
Return values
boolisRoot()
public
isRoot() : bool
Return values
boolisTemplate()
public
isTemplate() : bool
Return values
boolleave()
Stops the profiling.
public
leave() : void
reset()
public
reset() : void
serialize()
public
serialize() : string
Return values
stringunserialize()
public
unserialize(mixed $data) : void
Parameters
- $data : mixed