Introduction
Joomla! core has a JProfiler
help us mark some information in system process:
// Application is main namespace of Joomla core
$profiler = JProfiler::getInstance('Application');
$profiler->mark('afterRender');
But sometimes we need more flexible on adding other profiler namespace and print it. Windwalker provides a helper to do this.
ProfilerHelper
Using main namespace
Using this code, same as first code above:
ProfilerHelper::mark('my data', 'Application');
This data will appear in Joomla Debug Console.
Using my namespace
ProfilerHelper::mark('my data', 'MyNS');
But we need to print it:
ProfilerHelper::render('MyNS');
Using Windwalker Debug Console
ProfilerHelper::mark('FOO', 'Windwalker');
Then this data will appear in component bottom:
Found a typo? Help us improve this document.
This document is for Windwalker Joomla RAD, if you are finding Windwalker PHP framework, please see: Windwalker Framework