class NullProfiler implements ProfilerInterface (View source)

The NullProfiler class.

Methods

mark(string $name)

Mark a profile point.

boolean
hasPoint(string $name)

Check if the profiler has marked the given point.

ProfilerPointInterface
getPoint(string $name)

Get the point identified by the given name.

float
getTimeBetween(string $first, string $second)

Get the elapsed time in seconds between the two points.

integer
getMemoryBetween(string $first, string $second)

Get the amount of allocated memory in bytes between the two points.

integer
getMemoryPeakBytes()

Get the memory peak in bytes during the profiler run.

ProfilerPointInterface[]
getPoints()

Get the points in this profiler (from the first to the last).

string
render()

Render the profiler.

string
getName()

Get the name of this profiler.

Details

at line line 30
ProfilerInterface mark(string $name)

Mark a profile point.

Parameters

string $name The profile point name.

Return Value

ProfilerInterface This method is chainable.

Exceptions

InvalidArgumentException If the point already exists.

at line line 42
boolean hasPoint(string $name)

Check if the profiler has marked the given point.

Parameters

string $name The name of the point.

Return Value

boolean True if the profiler has marked the point, false otherwise.

at line line 54
ProfilerPointInterface getPoint(string $name)

Get the point identified by the given name.

Parameters

string $name The name of the point.

Return Value

ProfilerPointInterface The profile point or the default value.

at line line 69
float getTimeBetween(string $first, string $second)

Get the elapsed time in seconds between the two points.

Parameters

string $first The name of the first point.
string $second The name of the second point.

Return Value

float The elapsed time between these points in seconds.

Exceptions

LogicException If the points were not marked.

at line line 84
integer getMemoryBetween(string $first, string $second)

Get the amount of allocated memory in bytes between the two points.

Parameters

string $first The name of the first point.
string $second The name of the second point.

Return Value

integer The amount of allocated memory between these points in bytes.

Exceptions

LogicException If the points were not marked.

at line line 94
integer getMemoryPeakBytes()

Get the memory peak in bytes during the profiler run.

Return Value

integer The memory peak in bytes.

at line line 104
ProfilerPointInterface[] getPoints()

Get the points in this profiler (from the first to the last).

Return Value

ProfilerPointInterface[] An array of points in this profiler.

at line line 114
string render()

Render the profiler.

Return Value

string The rendered profiler.

at line line 124
string getName()

Get the name of this profiler.

Return Value

string The name of this profiler.