CodeIgniter Application Profiling

Codeigniter’s Profiler class gives the benchmark results, queries you have run and POST data and total time to execute the method etc..By using this information may used for debugging and optimization of your codeigniter application.

Enabling Profiler

To enable profiling of your application. Add below lines in specific controller:


Disable Profiler

To disable profiling of your application. Add below lines in specific controller:


Enabling and Disabling Profiler Sections

You can enable or disable profiling of a section by setting a Boolean value TRUE or FALSE. If you want to set profiling on the application then you can do in a file located in application/config/profiler.php

For example, the following command will enable profiling queries for the whole application.

$config['config']          = FALSE;
$config['queries']         = FALSE;

If you want to override the defaults profiling invirment and config file values by calling the set_profiler_sections() method of the Output Library. below lines in specific code

$sections = array(
        'config'  => TRUE,
        'queries' => TRUE

The config array to enable or disable a particular profile. Available sections and the array key used to access them are described in the table below.



Stack Overlode is optimized Tutorials and examples for learning and training. Examples might be simplified to improve reading and learning and understand. Tutorials and examples are constantly reviewed to avoid errors, but we cannot warrant full correctness of all content. While using Stack Overlode, you agree to have read and accepted our terms of use, cookie and privacy policy.