From ee71c80dd20bcfc60169af3eb1f628229ca30d67 Mon Sep 17 00:00:00 2001
From: Derek Jones
To enable the profiler place the following function anywhere within your Controller functions:
-$this->output->enable_profiler(TRUE);
+ To enable the profiler place the following function anywhere within your Controller functions:
+$this->output->enable_profiler(TRUE);
-When enabled a report will be generated and inserted at the bottom of your pages.
+When enabled a report will be generated and inserted at the bottom of your pages.
-To disable the profiler you will use:
-$this->output->enable_profiler(FALSE);
+ To disable the profiler you will use:
+$this->output->enable_profiler(FALSE);
-In order for the Profiler to compile and display your benchmark data you must name your mark points using specific syntax.
-Please read the information on setting Benchmark points in Benchmark Class page.
+In order for the Profiler to compile and display your benchmark data you must name your mark points using specific syntax.
+ +Please read the information on setting Benchmark points in Benchmark Class page.
+ + +Each section of Profiler data can be enabled or disabled by setting a corresponding config variable to TRUE or FALSE. This can be done one of two ways. First, you can set application wide defaults with the system/application/config/profiler.php config file.
+ +$config['config'] = FALSE;
+ $config['queries'] = FALSE;
+
+ In your controllers, you can override the defaults and config file values by calling the set_profiler_sections() method of the Output class:
+ +$sections = array(
+ 'config' => TRUE,
+ 'queries' => TRUE
+ );
+
+ $this->output->set_profiler_sections($sections);
+
+ Available sections and the array key used to access them are described in the table below.
+ +Key | +Description | +Default | +
---|---|---|
benchmarks | +Elapsed time of Benchmark points and total execution time | +TRUE | +
config | +CodeIgniter Config variables | +TRUE | +
controller_info | +The Controller class and method requested | +TRUE | +
get | +Any GET data passed in the request | +TRUE | +
http_headers | +The HTTP headers for the current request | +TRUE | +
memory_usage | +Amount of memory consumed by the current request, in bytes | +TRUE | +
post | +Any POST data passed in the request | +TRUE | +
queries | +Listing of all database queries executed, including execution time | +TRUE | +
uri_string | +The URI of the current request | +TRUE | +
To disable the profiler you will use:
$this->output->enable_profiler(FALSE);
+Permits you to enable/disable specific sections of the Profiler when enabled. Please refer to the Profiler documentation for further information.
The CodeIgniter output library also controls caching. For more information, please see the caching documentation.
-- cgit v1.2.3-24-g4f1b