VB3 MicroStats
This modification is in the archives.
You asked for... but it was available for VB2 only? There you go, you have it now.
Looking for 3.5.4 version? Get it here. VERSION 1.2 RELEASED Basically the only difference you will notice is a dropdown menu that will display the unchached templates. In this way, you can add it to the cache and save one or more queries. THIS HACK WAS TESTED IN A DEFAULT, CODE UNMODIFIED BOARD. This hack will add at the bottom of each vBulletin(powered) page the following stats: REGULAR USERS STATS - load time of specified page in microseconds (with custom no. of digits to show) - percentages of PHP/MySQL usage - number of queries executed ADMINISTRATOR STATS - number/name of uncached templates (name highlighted in blue, for uncached template) - vBulletin DEBUG mode status - server GZIP library compression status - average Server Loads This is not only estethic, it will also help you troubleshoot any wierd queries that you have in your scripts. IMPORTANT If you get results like: Page generated in 3.35731196 seconds (9.05% PHP - 90.95% MySQL) with 17 queries You probably use a bad piece of code, because vBulletin will never generate those extreme results. Imagine this: the code uses only 10% the resources to read the actual PHP code and the rest of 90% is used only to scan the tables... WOW! That means the code forces to read into the database for each user who visits the site at this percentage... if you have 1000 users viewing the page in the same time.. you can get a picture of it... If you compare this with vBulletin, the software does the opposite, 90% PHP and 10% MySQL... the right way. DIVISION BY ZERO ERROR? Read this Spoiler (click to open)
Ok i got it to work i edit this line
PHP Code:
$totaltime = number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], $msdecimal);
Close
INVALID STATS IF MYSQL COMPILED IN A NON-ENGLISH LANGUAGE? Read this Spoiler (click to open)
Apparently the hack produces invalid stats if MYSQL is compiled in a non-english language. This happens because MYSQL can be configured to use different 'lang_decimalsep' and 'lang_thousandsep' variable values which bothers the number formating through vb_number_format() function.
To fix it, I suggest to find: PHP Code:
$totaltime = vb_number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], $msdecimal);
and BEFORE that add: PHP Code:
$bbuserinfo['lang_decimalsep']='.'; $bbuserinfo['lang_thousandsep']=',';
Close
NOTE: The blue highlighting is not working in Opera 7.23 version. (Thanks Christine) Have fun. Download This modification is archived and cannot be downloaded. Screenshots
|