পৃষ্ঠাসমূহ

Search Your Article

CS

 

Welcome to GoogleDG – your one-stop destination for free learning resources, guides, and digital tools.

At GoogleDG, we believe that knowledge should be accessible to everyone. Our mission is to provide readers with valuable ebooks, tutorials, and tech-related content that makes learning easier, faster, and more enjoyable.

What We Offer:

  • 📘 Free & Helpful Ebooks – covering education, technology, self-development, and more.

  • 💻 Step-by-Step Tutorials – practical guides on digital tools, apps, and software.

  • 🌐 Tech Updates & Tips – simplified information to keep you informed in the fast-changing digital world.

  • 🎯 Learning Support – resources designed to support students, professionals, and lifelong learners.

    Latest world News 

     

Our Vision

To create a digital knowledge hub where anyone, from beginners to advanced learners, can find trustworthy resources and grow their skills.

Why Choose Us?

✔ Simple explanations of complex topics
✔ 100% free access to resources
✔ Regularly updated content
✔ A community that values knowledge sharing

We are continuously working to expand our content library and provide readers with the most useful and relevant digital learning materials.

📩 If you’d like to connect, share feedback, or suggest topics, feel free to reach us through the Contact page.

Pageviews

Tuesday, February 14, 2017

CodeIgniter - Application Profiling

When building a web application, we are very much concerned about the performance of the website in terms of how much time the controller took to execute and how much memory is used. Not only the performance, but we also need to see the insights of data like POST data, data of database queries, session data etc.
for debugging purpose while developing some application. CodeIgniter has made this job easier for us by profiling an application.

Enable Profiling

To enable profiling of your application, simply execute the command given below in any of the method of your controller.
$this->output->enable_profiler(TRUE);
The report of the profiling can be seen at the bottom of the page after enabling it.

Disable Profiling

To disable profiling of your application, simply execute the command given below in any of the method of your controller.
$this->output->enable_profiler(FALSE);

Enable / Disable Profiler Section

Profiling can be done on section basis. 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['queries'] = TRUE;
In the following table, the key is the parameter, which can be set in the config array to enable or disable a particular profile.
Key Description Default
benchmarks Elapsed time of Benchmark points and total execution time TRUE
config CodeIgniterConfig 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
session_data Data stored in the current session TRUE
query_toggle_count The number of queries after which the query block will default to hidden. 25
The profiler set in the file in application/config/profiler.php can be overridden by using the set_profiler_sections() function in controllers as shown below.
$sections = array( 
   'config'  => TRUE, 
   'queries' => TRUE 
); 
 
$this->output->set_profiler_sections($sections);

No comments:

Post a Comment