Hacks: Page timer & MySQL counter

Posted by: brashOn 2004/11/17 19:32:44 12420 reads
Got a little distracted this week and as a little side project I have created a smarty insert plugin that displays the page execution time, and MySQL queries generated to render each page. The advantage of using the insert method is that the insert function code is always executed each time it is invoked, and isn't cached in the template along with all the other output data. This meaning that the page timer and MySQL counter figures are always going to be current and relevant to the page being displayed, regardless of if block and/or module cache is active.

You can see a demostration of this code at the base each page at IT Headquarters. I would like to send a big thank you to Mith and Dave_L who got me over the line on this one .

Download It Here!

Best yet is that no system files need to be modified, and you can have this plugin up and running in just a few minutes. Installation instructions are below;