vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.0 Full Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=33)
-   -   Microstats (only for admin) - load times, server loads, queries, uncached templates! (https://vborg.vbsupport.ru/showthread.php?t=59700)

M@rkus 02-19-2004 01:54 PM

well.. on my first board it works with RC2 but on the other board it won`t show up!

M@rkus 02-19-2004 02:22 PM

I ve found the problem.. the code was there but the style is another so the code was on a black backround.

Next question. Where else can i place the CODE in the functions.php to get the Stats on another place in the footer?

Sugoi 02-25-2004 04:42 AM

I get parse error :S

if I delete this line it will not get a error but the mircostats not work well ...

PHP Code:

$debughtml .= " (<a href=\"" htmlspecialchars_uni(SCRIPTPATH) . iif(strpos(SCRIPTPATH'?''?')=== false'?''?','&amp;') . "tempusage=1\">Template Usage</a>) (<a href=\"" htmlspecialchars_uni(SCRIPTPATH) . iif(strpos(SCRIPTPATH'?''?')=== false'?''?','&amp;') . "explain=1\">Explain</a>)<br />\n"


Zelda-King 02-25-2004 09:53 AM

If you run a search in this thread on the word 'parse' you'll see this has been brought up. It's probably your text editor or something. But you might want to state what version of vBulletin you're using.

Gary King 02-25-2004 11:13 AM

Quote:

Originally Posted by Sugoi
I get parse error :S

if I delete this line it will not get a error but the mircostats not work well ...

PHP Code:

$debughtml .= " (<a href=\"" htmlspecialchars_uni(SCRIPTPATH) . iif(strpos(SCRIPTPATH'?''?')=== false'?''?','&amp;') . "tempusage=1\">Template Usage</a>) (<a href=\"" htmlspecialchars_uni(SCRIPTPATH) . iif(strpos(SCRIPTPATH'?''?')=== false'?''?','&amp;') . "explain=1\">Explain</a>)<br />\n"


Usually it's also a good idea to show what the parse errors says ;)

Chris M 02-25-2004 11:46 AM

Installed and working perfectly on RC4 :)

Showthread.php :

Page generated in 0.12244 seconds with 12 queries [Server Loads: 0.27 ? 0.27 : 0.27]
:D

Satan

Sugoi 02-25-2004 01:37 PM

got this :

Parse error: parse error in /home/jironet/public_html/forum/includes/functions.php on line 1795

Fatal error: Call to undefined function: is_browser() in /home/jironet/public_html/forum/global.php on line 59

I got version RC4

NTLDR 02-25-2004 01:51 PM

I assume you used dreamweaver to edit the files, use a different editor.

Sugoi 02-25-2004 02:18 PM

yes i use dreamweaver to search the lines , and edit it .. I'l try another eidtor

EDITED : It works , thank you !

Btw how can I put that line somewhere else ? So not the bottom of the page ! But in the table ?

Gary King 02-25-2004 06:35 PM

Quote:

Originally Posted by Sugoi
yes i use dreamweaver to search the lines , and edit it .. I'l try another eidtor


EDITED : It works , thank you !

Btw how can I put that line somewhere else ? So not the bottom of the page ! But in the table ?

In what table? Anyways that would require quite a bit more hacking (much more than what you currently have to do for right now) so I would suggest just leaving it how it is right now, it's fine in the footer; also if you move it up then I believe your values will be slightly inaccurate because then the microstats will display before the page is completely loaded.

AlexanderT 02-27-2004 04:19 PM

Is it possible to split the page load time into time needed for php and time needed for mysql (similar to the 2.x microstat hack)?

Red Blaze 02-27-2004 09:37 PM

I can't get it to work. I get a parse error and a fatal error.

I'm gonna try to edit the php file in Windows see what I get. I'm using a MAC right now, maybe that's why. >_>; I hate macs.

Gary King 02-27-2004 09:45 PM

Quote:

Originally Posted by Sonikku
I can't get it to work. I get a parse error and a fatal error.

I'm gonna try to edit the php file in Windows see what I get. I'm using a MAC right now, maybe that's why. >_>; I hate macs.

Macs rule! :D

Red Blaze 03-01-2004 06:42 PM

Tried to install it on Windows and works perfectly. :)

Boofo 03-01-2004 06:49 PM

Quote:

Originally Posted by AlexanderT
Is it possible to split the page load time into time needed for php and time needed for mysql (similar to the 2.x microstat hack)?

Not with this version, I don't think. ;)

Oblivion Knight 03-03-2004 01:23 PM

Quote:

Originally Posted by Boofo
Not with this version, I don't think. ;)

http://www.bearfacts2.com/forums

Spill the beans.! ;)

AlexanderT 03-03-2004 03:19 PM

Quote:

Page generated in 0.16018701 seconds (87.84% PHP - 12.16% MySQL) with 13 queries.
Would you mind sharing it with us? Btw, I had 25 queries the first time I entered your site, then I had those 13 queries you see above. Both seems like a lot to me given that the unhacked forumindex has something like 8 queries.

Frank 03-03-2004 03:55 PM

Great hack, cheers :)

Boofo 03-03-2004 05:12 PM

Quote:

Originally Posted by AlexanderT
Would you mind sharing it with us? Btw, I had 25 queries the first time I entered your site, then I had those 13 queries you see above. Both seems like a lot to me given that the unhacked forumindex has something like 8 queries.

I think an unhacked version is like 11 queries, isn't it? 13 queries is damned good with all the stats I have on the forumhome. ;) And 25 is when the stats cache gets updated (every 10 minutes).

You guys will have to go to the site to get it. I can't release it here since it basically is just the version Teck released for vB2 re-worked for vB3. ;)

AlexanderT 03-04-2004 06:20 AM

That is from my forumhome, unhacked, user logged in:

Page generated in 0.16946 seconds with 7 queries [Server Loads: 0.29 » 0.23 : 0.25]

AlexanderT 03-04-2004 06:20 AM

Quote:

Originally Posted by Boofo
You guys will have to go to the site to get it. I can't release it here since it basically is just the version Teck released for vB2 re-worked for vB3. ;)

Thanks, will do!

Boofo 03-04-2004 07:02 AM

Quote:

Originally Posted by AlexanderT
That is from my forumhome, unhacked, user logged in:

Page generated in 0.16946 seconds with 7 queries [Server Loads: 0.29 ? 0.23 : 0.25]

Which RC version are you using? Because the lowest I have ever seen it is 9.

Gary King 03-04-2004 06:38 PM

Quote:

Originally Posted by Boofo
Which RC version are you using? Because the lowest I have ever seen it is 9.

I've already reached 7 as well, for I believe all the vB 3 versions or at least most of them.

BBQ 03-12-2004 12:11 PM

Installed on RC4.

Works like a charm, nice hack

Much appriciated :D

I only installed it to view the number of queries. Can anybody explain the other info to me:
Quote:

Page generated in 0.42810 seconds with 8 queries [Server Loads: 2.13 ? 1.77 : 1.46]
I mean the server loads part.

Tnx

TECK 03-12-2004 02:58 PM

Quote:

Originally Posted by AlexanderT
Is it possible to split the page load time into time needed for php and time needed for mysql (similar to the 2.x microstat hack)?

Do a search for Microstats, there is a version for VB3.

neocorteqz 03-20-2004 01:30 AM

Parse error: parse error in /home/neocort2/public_html/includes/functions.php on line 1813

Fatal error: Call to undefined function: is_browser() in /home/neocort2/public_html/global.php on line 59

and i don't use dreamweaver. I use the one built into CuteFTP, never had a problem before.

and line 1813 is else

vB 3.0 RC 3.

Edit, tried rehacking with wordpad. No go.

edit 2, Working with the current stable release. :)

PlenoJure 03-21-2004 08:20 AM

Installed & working quite well on gold :)

Thanks!

neocorteqz 03-22-2004 07:08 AM

Quote:

Originally Posted by PlenoJure
Installed & working quite well on gold :)

Thanks!

I know it's off topic, but Howdy from a close florida resident. :)

kyrnel 03-22-2004 06:22 PM

Quote:

Page generated in 0.16578 seconds with 11 queries [Server Loads: 0.02 ? 0.09 : 0.13]
I guess that's good for a forum with 20k members and 500k posts.

Nice hack, thanks!

Preds 03-22-2004 09:52 PM

Nice, installed on my vB 3.0.0 Gold board without incident.

BTW, I only have 3 hacks installed (the Welcome Hack, the Who Was Online Dynamic Hack, and this one)... are these numbers OK?

Page generated in 0.13595 seconds with 14 queries [Server Loads: 0.60 » 0.46 : 0.48]

At the time 2 users were OL. Is 14 queries high? If so what would cause that?

BarBeQue 03-27-2004 12:18 PM

Ever since i installed the sidebar hack i get 1 uncached template:
Page generated in 0.37613 seconds with 11 queries (1 queries for uncached templates) [Server Loads: 0.63 ? 1.10 : 1.84]

Hence my obvious conclusion is that it's the sidebar template that's uncached (yes indeed, i'm quite the detective ;) ).
Anyway, how can i add this template to the cache?

lifesourcerec 04-01-2004 09:20 AM

Very nice. 8 queries here. But then again, just installed the new version with 1 hack.

BarBeQue 04-02-2004 04:55 PM

Ok, i solved my own problem. Posted the fix in the sidebar thread (for the peepz that use search and stumble on this thread)

Tnx again Erwin, your nice hack showed me the uncached template without needing to turn debug on :D

surfhog 04-08-2004 09:54 PM

WOW wee yippy

Thanks Erwin, at least I got one hack from this board to work :)

neocorteqz 04-08-2004 10:49 PM

small question. is 13 queries too much?? lol. Actually i'm serious, i think the default install was something like 8 or 9 on forum home.

cerebro 04-09-2004 11:14 PM

Nice hack, just install in VB3 gold.

Loyalty4Life 04-15-2004 12:12 AM

Thanks Erwin!

/me likes and clicks install.

kmike 04-17-2004 06:42 PM

Perfect hack.
I just want to suggest a little tweak which will eliminate exec call (and associated "fork" system call). It will work at least on Linux, not sure about freebsd.
PHP Code:

        if ($bbuserinfo[usergroupid]==6) {
                
$pageendtime microtime();
                
$starttime explode(' '$pagestarttime);
                
$endtime explode(' '$pageendtime);
                
$totaltime vb_number_format($endtime[0] - $starttime[0] + $endtime[1] - $starttime[1], 5);
                
$loadavg = @file_get_contents("/proc/loadavg");
                if (
$loadavg) {
                        
$regs explode(" ",$loadavg);
                        
$serverload=' [Server Loads: <b>'.$regs[0].'</b> '.$regs[1].' : '.$regs[2].']';
                }
                
$debughtml "<center><span class=\"smallfont\">Page generated in <b>$totaltime</b> seconds with <b>$query_count</b> queries" iif($_TEMPLATEQUERIES" (<b>" sizeof($_TEMPLATEQUERIES) . "</b> queries for uncached templates)"'') . "$serverload</span></center>";
                
$vartext str_replace('</body>'"$debughtml\n</body>"$vartext);
        } 


Rich 04-18-2004 11:43 PM

Hello,
I am a newbie myself,but you guys are amazing. I applied ALL the hacks with the directions I have been provided and my forum houses a portal (VBadvanced),as well as over 18 different hacks and numerous custom templates. With all that said,this is what I am running at right now with 10 members and 3 guests:

Page generated in 0.11039 seconds with 9 queries [Server Loads: 0.64 » 0.39 : 0.34]

Now I know I can lower this some as I have made no attempt at lower the queries. lol Any suggestions for lowering queries?

Rich 04-19-2004 12:50 PM

I have 2 uncached templates. I don't know how to cache a template. That is something I haven't done yet. I could use some guidance with this.


All times are GMT. The time now is 01:16 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01462 seconds
  • Memory Usage 1,846KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (3)bbcode_php_printable
  • (14)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete