Profiler
class Profiler
Utility class to assist in the process of benchmarking the execution of sections of code to understand where time is being spent.
Methods
__construct(
string $prefix = '')
Constructor
static
Profiler
getInstance(
string $prefix = '')
Returns the global Profiler object, only creating it if it doesn't already exist.
string
mark(
string $label)
Output a time mark
static
float
getmicrotime()
Get the current time.
integer
getMemory()
Get information about current memory usage.
array
getMarks()
Get all profiler marks.
array
getBuffer()
Get all profiler mark buffers.
$this
setStart(
double $startTime,
int $startMem)
Sets the start time.
Details
static
Profiler
getInstance(
string $prefix = '')
Returns the global Profiler object, only creating it if it doesn't already exist.
array
getMarks()
Get all profiler marks.
Returns an array of all marks created since the Profiler object was instantiated. Marks are objects as per {@link JProfiler::mark()}.