Join · Login ·

Tutorial

One of the Dolphin 7 modules that doesn't get a lot of attention or mention is the Profiler Module. In fact, if you install it you may not even know what it does, or how useful it can be.

After installing the Dolphin 7 Profiler module, pay close attention because it is also very easy to miss or overlook an important step to make it work. You need to be very observant and alert because you will be given instructions about adding a piece of code to your /inc/header.inc.php file. If you don't add the code provided it won't do anything. It is pretty easy to miss because you need to expand the plus sign or symbol (+) during module installation in order to see and get the code. It probably should be open and expanded by default to make it easier to see, but for some reason it's not.


How to install the Dolphin 7 Profiler Module


If you haven't installed the Dolphin 7 Profiler module yet simply login to Dolphin 7 administration and find:
Tools
-Modules

Dolphin 7 Modules



In the center of the sreen locate the "Not Installed Modules" area. Tick or check the box for Profiler and click "Install".

Dolphin 7 Profiler Module



It should say something like: "Installation of: Profiler Done +

Important! Before leaving this page find the little plus (+) and click on it to open and expand it.

You will find additional instructions that tell you:

To complete installation add the following lines to the beginning of inc/header.inc.php file:

define ('BX_PROFILER', true);
if (BX_PROFILER && !isset($GLOBALS['bx_profiler_start']))
$GLOBALS['bx_profiler_start'] = microtime ();

Dolphin 7 Profiler Module Installed



It would be a good idea to copy the complete code to Windows notepad or another plain text editor just so you have it. Otherwise if you navigate away from the current page you will need to uninstall and re-install the Dolphin 7 Profiler module again in order to find the instructions and code again.

Before adding this code to /inc/header.inc.php be sure to download and make a backup of /inc/header.inc.php. The header.inc.php is unique to your website and if you mess it up there is no restoring it or getting another copy from the Boonex Dolphin 7 download .zip file. You don't want to mess the file up because it can cause your site to stop working. So be sure you have a backup just in case.

Now open /inc/header.inc.php with your favorite text editor or use your hosts file manager to edit the file. Near the top of the file paste in the code:

define ('BX_PROFILER', true);
if (BX_PROFILER && !isset($GLOBALS['bx_profiler_start']))
$GLOBALS['bx_profiler_start'] = microtime ();

Save the changes back to your hosting account.

It should look something like this:

Add Code to Header



Now when you browse your website you will find some useful details at the bottom of each page as a result of the Dolphin 7 Profiler module.

Note:
You must be logged in as the administrator with the default configuration. Your regular visitors and members will not see this info.


How to turn off or disable the Dolphin 7 Profiler Module


The Dolphin 7 Profiler module is probably something you don't need to use all the time. When you are done with it you can simply remove the code you added to /inc/header.inc.php and you will no longer see the details and info at the bottom of your pages.

Alternatively you can also turn it off or disable it in /inc/header.inc.php by changing true to false like so:

define ('BX_PROFILER', false);
if (BX_PROFILER && !isset($GLOBALS['bx_profiler_start']))
$GLOBALS['bx_profiler_start'] = microtime ();

If you want to turn it back on at a later time to do more testing simply change false back to true.


What is so great about the Dolphin 7 Profiler Module?

It can provide useful details about how long it page render time, module render time, database queries, how much memory the current page uses, and much more.

The render time shouldn't be confused with page load time. Render time is how long it takes for your hosting server to actually process and output the code. Page load time is much different so don't get too excited if you see see small numbers.

It will provide you with details about which modules are being used or loaded on each page, what the render time is, how many database queries there are, etc.

Try turning off and clearing the Dolphin 7 cache features and these numbers generally increase, some of them substantially.

Dolphin 7 Profiler Module Results



If you have already installed the Dolphin 7 Profiler Module, but missed the instructions about adding the code simply add the following to /inc/header.inc.php and save the changes back to your hosting account:

define ('BX_PROFILER', true);
if (BX_PROFILER && !isset($GLOBALS['bx_profiler_start']))
$GLOBALS['bx_profiler_start'] = microtime ();



Overall the Dolphin 7 Profiler Module is a very good feature that will allow you to see how your website is performing and whether you can or need to do any additional optimizing.


Other related Dolphin Tutorials:
How to Install Modules in Dolphin 7
How to Track Page Load Times with Google Analytics
How to Install Dolphin 7

 
Tutorial by: Jeremy LeSarge (AKA Ray)

I am the owner and administrator of DialMe.com. I write Tutorials for Boonex Dolphin as well as tips and resources surrounding website programming and development. I enjoy working with WordPress, SEO, and Web Hosting / Servers. I also maintain a WordPress Blog here on this site where you will find a variety of technology and webmaster resources.

Actions
Recommend