malyshev/yii-debug-toolbar — pull request #77 by shawntolidano (2013-02-08 17:01:24+00:00)
Title: Add Profiler Tab into Yii Debug Toolbar

The only thing missing from this amazing extension was the ability to profile each method call. Using the sample provided by GoDaddy (from here: http://inside.godaddy.com/write-code-profiler-php/), we created a simple profiler and added the tab to the toolbar.

Turning it on is as easy as this:
if ($dbg) { //whatever you use to decide if the toolbar should show up or not.
require_once dirname(__FILE__).'/../extensions/yii-debug-toolbar/YiiDebugProfiler.php';
declare(ticks=1);
YiiDebugProfiler::start_profile();
}