Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vBMicrostats Details »»
vBMicrostats
Version: 1.0.5, by TECK TECK is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 05-18-2006 Last Update: 05-21-2006 Installs: 92
Uses Plugins Template Edits
Code Changes  
No support by the author.

Finally, the vBMicroStats product for vBulletin 3.5.4 is here.
The previous versions of my mod were very solicited by vBulletin administrators...
I hope you will enjoy this new version as much you did the other ones.

Looking for VB 3.6.x version? It is here.

This mod with add at the bottom of each vBulletin (powered) page, the statistics listed below.
Also, it will help you troubleshoot and optimize your vBulletin board by viewing or comparing PHP/MySQL options and other statistics that are normally hidden in your forum pages.

Regular Users:
? Load time of specified page in microseconds
? Number of queries executed
? PHP percent page usage
? MySQL percent page usage

Administrators Only:
? Server memory usage per page (in Kb)
? DEBUG mode status
? Browser GZIP library compression status
? Server average loads
? Uncached templates (useful to troubleshoot the code)

The code modifications listed below were tested into a clean installed vBulletin board. They work 100%.
If you encounter any problems, feel free to post your questions here.

Step by step install instructions are posted into vbmicrostats.html file.
In order to perform an efficient modification of your files, I recommend you to use Dreamweaver (Coder Mode) or Textpad.
Both editors will allow you to complete all steps without any coding errors.

I tried to use the plugin system as much as I could, in order to avoid any unnecessary code modifications.
In order to set the right query execution time, you will need to perform 2 small code changes to each of the following files:
? class_core.php (folder /includes)
? init.php (folder /includes)

The code changes are very safe and designed not to interfere in any way with the vBulletin performance/functionality.
Make sure you modify, save and upload one file at the time to your server.
Then, simply run the product-plugin_vbmicrostats.xml file.

Once the product installed, don't forget to enable it.
Go to your vBulletin Options, click on BB MicroStats setting group and set all your options.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #112  
Old 05-24-2006, 03:03 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No pain at all, it's a very good idea.
Btw, I'm counting on guys like you... that will post the actual code changes.
Go ahead and post them. Thank you for helping out.

EDIT: 26 queries on your front page.. aren't you affraid???
Reply With Quote
  #113  
Old 05-24-2006, 02:17 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or you can do like I did and re-upload the 2 files and you won't have to remember the changes then.
Reply With Quote
  #114  
Old 05-24-2006, 06:56 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

TECK, how do I change the class name from "page" to "tfoot"? And what's up with the debuge mod? It says it's currently off.

Take a look - http://www.bonethugsforums.com/
Reply With Quote
  #115  
Old 05-25-2006, 12:36 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Edit this code, inside the vBMicroStats Global Hook:
Code:
	// regular users template
	$users_template  = '<tr align="' . $stylevar['right'] . '">' . "\n";
	$users_template .= '	<td class="tcat"' . iif($show['colspan'], ' colspan="' . $colspan . '"') . '>' . "\n";
	$users_template .= '		<span class="smallfont">Page generated in ' . $total_time . ' seconds (' . $php_percent . ' - ' . $sql_percent . ') with ' . $query_count . ' queries</span>' . "\n";
	$users_template .= '	</td>' . "\n";
	$users_template .= '</tr>' . "\n";

	// administrator template
	$admin_template  = '<tr align="' . $stylevar['right'] . '">' . "\n";
	$admin_template .= '	<td class="alt1"' . iif($show['colspan'], ' colspan="' . $colspan . '"') . '>' . "\n";
	$admin_template .= '		<span class="smallfont">' . $memory_status . $debug_status . $gzip_status . $server_status . $templates_status . '</span>' . "\n";
	$admin_template .= '	</td>' . "\n";
	$admin_template .= '</tr>' . "\n";
Debug mode is always OFF, unless you add this line into your config.php file:
$config['Misc']['debug'] = true;

This is more like a security feature, in case you forget about it...
Reply With Quote
  #116  
Old 05-25-2006, 09:29 PM
Snake's Avatar
Snake Snake is offline
 
Join Date: Mar 2005
Location: Cleveland, OH
Posts: 3,832
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Oh thanks for your support!
Reply With Quote
  #117  
Old 05-25-2006, 09:51 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Is it normal for this:

Quote:
(33.50% PHP - 66.50% MySQL)
to flucuate to this:

Quote:
(76.21% PHP - 23.79% MySQL)
constantly? That is the report bad post page (with 7 queries) and it seems to go back and forth with almost every page refresh, or two. Not complaining, Teck, just curious.

EDIT: Well, I just had this one show up on the same page:

Quote:
(-10.93% PHP - 110.93% MySQL)
Reply With Quote
  #118  
Old 05-25-2006, 11:10 PM
Raptor Raptor is offline
 
Join Date: Nov 2001
Posts: 499
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

what are my numbers like re: performance

Page generated in 1.18516898 seconds (49.02% PHP - 50.98% MySQL) with 14 queries
4,182.56KB Used | DEBUG Mode OFF | GZIP ON (level 1) | NO Uncached Templates
Reply With Quote
  #119  
Old 05-26-2006, 05:49 AM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Bob, do you have a cache installed? That's what it generates a SQL spike...
I actually opened a ticket for this matter to vBulletin, their own code generates the same results...
http://www.vbulletin.com/forum/bugs3...iew&bugid=2481

So far Scott and Freddie are looking for a solution, the bug was confirmed.
The issue we are dealing with is the following:
Once a query is cached, the SQL execution time (%) gets low, only the connection time and other non cached SQL processes are filtered by vBMicroStats. Then, once the queries are not in the cache anymore, BOOM, a heavy SQL demand is passed to the server.

That explains the high SQL % you get sometimes. I'm in the same boat, no fix possible in my eyes, that's the way caches work.
I hope vB Team will find a trick in their hat. read more in the bug thread I opened.
Reply With Quote
  #120  
Old 05-26-2006, 08:32 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

No, sir, no cache installed at all. I didn't notice it on the earlier versions of this hack but then I didn't really check it that closely then. I'll wait to hear what you find out.
Reply With Quote
  #121  
Old 05-26-2006, 04:20 PM
TECK's Avatar
TECK TECK is offline
 
Join Date: Nov 2001
Location: Canada
Posts: 4,182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hmm. It should be stable then, except when the VB default query cache is performed.

Do this: Open a support ticket with vBulletin and ask why the query time and php time are not at all stable, all the time.
They will ask you to show them the exact probem...
Enable Debug Mode then let them see the explained queries. You will notice (at the end of the page in bold) that the query execution time at the end varies in a similar way, maybe a little higher then vBMicroStats.

Post the ticket results for all of us. IMO, it's someting related to the server? vBMicroStats actually reads what is fed into the script, that's all.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 06:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.08254 seconds
  • Memory Usage 2,316KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (2)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete