Profiler Class

The profiler class allows you to add your own profiling information to the profiler.

mark($label)

The mark method will add a speed marker to the profiler. This marker will show in the "Load Time" section of the profiler.

Static Yes
Parameters
Param Default Description
$label required A text label to describe the marker to be set.
Returns void
Example
Profiler::mark('start of this piece of code');

mark_memory($var, $name)

The mark_memory method will add a memory marker to the profiler. If you pass a variable, the memory usage of that variable will be logged. If not, the memory usage at the time of marking will be logged.

Static Yes
Parameters
Param Default Description
$var false The variable whose size has to be logged. If false or not specified, PHP memory usage will be logged.
$name 'Memory Usage' A text label to describe the marker to be set.
Returns void
Example
Profiler::mark_memory($this, 'Controller_Welcome object');

console($text)

The console method will add a log entry to the profiler.

Static Yes
Parameters
Param Default Description
$text required A text to describe the log entry to be set.
Returns void
Example
Profiler::console('start of this piece of code');