News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Kenny Katzgrau's Blog:
Enable Site-Wide Profiling With CodeIgniter
December 30, 2010 @ 09:07:33

On his blog today Kenny Katzgrau talks about a handy feature of the CodeIgniter framework - profiling - and how you can implement it site-wide rather than just on a controller by controller basis.

In your controller before you load a view, CodeIgniter will give you information regarding how fast the page loaded, how many SQL queries executed, the content of each query, and the running time of each query. This is incredibly useful when you are trying to debug your application, or simply see how quickly things are loading. There's only one problem: To enable profiling, that line of code above must be present. What if you want to profile several pages, or even your whole web application?

He turned to another built-in feature of the framework, the controller hooks it allows, to set up a simple post-controller execution that gets a new CodeIgniter instance and enables the profiling configuration item. This is a much better option than having to put the line in each and every controller and method he might want profiled.

0 comments voice your opinion now!
sitewide profiling codeigniter framework tutorial


blog comments powered by Disqus

Similar Posts

CodeIgniter Blog: GitHub, Reactor, and v2.0.3

Debuggable Blog: How To Save Half A Second On Every CakePHP Request

Fabien Potencier's Blog: Create your own framework... on top of the Symfony2 Components (part 12)

Zend Developer Zone: Quick Start Symfony DI (Dependency Injection) Tutorial

Matthew Weier O'Phinney's Blog: Getting started writing ZF2 modules


Community Events





Don't see your event here?
Let us know!


series api library package zendserver introduction unittest language opinion symfony bugfix update laravel podcast deployment release community framework version interview

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework