The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
VB3 MicroStats Details »» | |||||||||||||||||||||||||
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. [high]THIS HACK WAS TESTED IN A DEFAULT, CODE UNMODIFIED BOARD.[/high] 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 [high]This is not only estethic, it will also help you troubleshoot any wierd queries that you have in your scripts.[/high] IMPORTANT If you get results like: Page generated in 3.35731196 seconds (9.05% PHP - [high]90.95%[/high] 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. INVALID STATS IF MYSQL COMPILED IN A NON-ENGLISH LANGUAGE? Read this. NOTE: The blue highlighting is not working in Opera 7.23 version. (Thanks Christine) Have fun. Show Your Support
|
Comments |
#92
|
||||
|
||||
Thanks for the update, Now i don't have any uncached templates, but if i did, how would i go about adding it to the list of cached templates?? Just asking for a push in the right direction, not the outright answer, unless it really is that simple.
thanks again. |
#93
|
||||
|
||||
Thanks for the update TECK, however your instructions still say Version 1.1
|
#94
|
|||
|
|||
TECK, how can I update from version 1.1?
|
#95
|
||||
|
||||
The change is listed in file: FORUM/includes/functions.php (1 change more exacly).
Look at the old 1.1 file and replace the code with the new one. Cheers. |
#96
|
||||
|
||||
To update from v1.1 to v1.2, do the following:
In functions.php, find: PHP Code:
PHP Code:
|
#97
|
||||
|
||||
Using the code Boofo posted there is no space between the dropdown and the DEBUG status. Just a little thing but I think a space there would make it look better.
|
#98
|
||||
|
||||
All I did was post what was changed in the file.
|
#99
|
||||
|
||||
Quote:
Look at the global line there. If I would be you, I would replace, in functions.php, the first block of code (first change) to make sure there is no confusion: Code:
function print_output($vartext, $sendheader = 1) { global $pagestarttime, $query_count, $querytime, $DB_site, $bbuserinfo; global $vbphrase, $vboptions, $stylevar, $_REQUEST, $_TEMPLATEQUERIES, $tempusagecache, $debug, $nozip, $ms; $pageendtime = microtime(); // Number of decimals to show for microtime (ex 0.15227890) $msdecimal = '8'; if ($vboptions['addtemplatename']) { if ($doctypepos = strpos($vartext, $stylevar['htmldoctype'])) { $comment = substr($vartext, 0, $doctypepos); $vartext = substr($vartext, $doctypepos + strlen($stylevar['htmldoctype'])); $vartext = $stylevar['htmldoctype'] . "\n" . $comment . $vartext; } } $starttime = explode(' ', $pagestarttime); $endtime = explode(' ', $pageendtime); $totaltime = vb_number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], $msdecimal); $msphp = vb_number_format(((($totaltime - $querytime) / $totaltime) * 100), 2) . '% PHP'; $mssql = vb_number_format((($querytime / $totaltime) * 100), 2) . '% MySQL'; $ms = '<tr align="right">' . "\n"; $ms .= ' <td class="tcat"' . iif($vboptions['allowchangestyles'], ' colspan="2"') . '><div class="smallfont">'; $ms .= 'Page generated in ' . $totaltime . ' seconds (' . $msphp . ' - ' . $mssql . ') with '; $ms .= $query_count . ' queries</div></td>' . "\n"; $ms .= '</tr>' . "\n"; if ($bbuserinfo['usergroupid'] == '6') { $mstemplates = '<select size="1" style="font-size: 10px">' . "\n"; if ($_TEMPLATEQUERIES) { $mstemplates .= '<option>' . sizeof($_TEMPLATEQUERIES) . ' Uncached Template'; $mstemplates .= iif(sizeof($_TEMPLATEQUERIES) != '1', 's') . '</option>'; if (is_array($tempusagecache)) { global $vbcollapse; ksort($tempusagecache); foreach ($tempusagecache AS $tempname => $times) { if ($_TEMPLATEQUERIES["$tempname"]) { $mstemplates .= '<option class="alt2">' . $tempname . ' (' . $times . ')</option>'; } else { $mstemplates .= '<option>' . $tempname . ' (' . $times . ')</option>'; } } } } else { $mstemplates .= '<option>NO Uncached Templates</option>'; } $mstemplates .= '</select>'; $msdebug = 'DEBUG Mode OFF | '; if ($debug) { $msdebug = 'DEBUG Mode ON | '; } $msgzip = 'GZIP OFF | '; if ($vboptions['gzipoutput'] AND !$nozip) { $msgzip = 'GZIP ON (level ' . $vboptions['gziplevel'] . ') | '; } $msserver = ''; if ($stats = @exec('uptime 2>&1') AND trim($stats) != '') { if (preg_match("/averages?: ([0-9\.]+),[\s]+([0-9\.]+),[\s]+([0-9\.]+)/", $stats, $regs)) { $regs[1] = vb_number_format($regs[1], 2); $regs[2] = vb_number_format($regs[2], 2); $regs[3] = vb_number_format($regs[3], 2); $msserver = '<b>' . $regs[1] . '</b> : ' . $regs[2] . ' : ' . $regs[3] . ' | '; } } $ms .= '<tr align="right">' . "\n"; $ms .= ' <td class="alt1"' . iif($vboptions['allowchangestyles'], ' colspan="2"') . '><div class="smallfont">'; $ms .= $msdebug . $msgzip . $msserver . $mstemplates . '</div></td>' . "\n"; $ms .= '</tr>' . "\n"; } if (DB_QUERIES) { $ms = ''; $vartext .= "<!-- Page generated in " . $totaltime . " seconds with $query_count queries -->"; } // #################################################################### // temporary code global $DEVDEBUG, $_SERVER; if ($debug) { Let me know if that makes sense. Thanks Bob. |
#100
|
||||
|
||||
Ok, thanks. I was just trying to help. I guess I should have looked for more changes.
|
#101
|
||||
|
||||
Quote:
You helped me several times in my threads with bugs, etc. as well others. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|