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:
$this->output->enable_profiler(TRUE);
Disable Profiler
To disable profiling of your application. Add below lines in specific controller:
$this->output->enable_profiler(FALSE);
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
);
$this->output->set_profiler_sections($sections);
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.