PDA

View Full Version : Microstats (only for admin) - load times, server loads, queries, uncached templates!


Pages : 1 [2]

KW802
03-14-2005, 07:09 PM
Besides that he wants to cut back the amount of queries on that page.

Now If I read that right, if he caches those two he'll save 6?He should. In this case the 'latesttopics' is comprised of several 'latesttopicsbits' so his net effect should be 6 like you said.

Cyricx
03-15-2005, 06:07 PM
Moved to a new host and I am having some terrible page load times.

Added in this hack to try to locate the source and the page load times are coming up whacky.

I expected 2.0 - 3.0 but I'm not even getting a .

Bug? :)

Was hoping to use this to get some hard numbers to throw at them ;)

Erwin
03-15-2005, 08:03 PM
Moved to a new host and I am having some terrible page load times.

Added in this hack to try to locate the source and the page load times are coming up whacky.

I expected 2.0 - 3.0 but I'm not even getting a .

Bug? :)

Was hoping to use this to get some hard numbers to throw at them ;)
Ask your host. ;)

Cyricx
03-15-2005, 08:06 PM
Hehe so it's totally on their side :)

The pages are loading in 10-30 seconds. I wasn't sure if that stall was causing a bug in the hacks code or something :)

I figure it's prolly supposed to be 5.6xxx seconds.

Thats Erwin, great hack and gives me something to gripe at them with some hard numbers :)

MentaL
03-15-2005, 09:51 PM
thanks

Page generated in 0.17211 seconds with 8 queries [Server Loads: 0.57 ? 0.92 : 0.83]

MentaL
www.ragezone.com

GoWo
03-20-2005, 01:34 AM
Is there any reason I get this error message after installing this hack?

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/********/********/includes/functions.php on line 2044


I saw that editing the functions.php file in Dreamweaver doesn't work, si I have used Notepad and Kate.

Tried copy and pasting - no joy.
Tried typing out entire hack - no joy.

Any ideas?

lasto
03-29-2005, 11:37 PM
just installed on 3.0.7 works fine

Reeve of shinra
05-05-2005, 04:12 AM
I was wondering if it would be possible to display slow queries as well? I like to keep an eye on that stuff and since its visable only to admins, I dont think that would add much of a hit, no?

Kaishi
05-10-2005, 03:56 AM
for some reason, i installed, had it working fine on 3.07. then after a certain hack, forgot which. i stopped seeing the server loads. only queries and load time. ?_?

edit: nvm, used the older version and started working again. no idea why, anyone wanna enlighten me?

buro9
06-15-2005, 04:33 AM
Nice and strange one this.

I've installed an SSL certificate on my site and am encouraging users to use SSL'd access to the forum (as it's harder for companies to block, keeps their cookies and requests secret, and prevents referer info being sent to third party sites).

Now when I surf on https:// , the 1.2 version fails. Yet when I surf http:// the 1.0 version works.

What I've done is to combine both.

If 1.2 works it uses it, otherwise it rolls over to the 1.0 version.

Strange, interesting... fixed :)

Snort_2005
06-19-2005, 01:43 PM
*clicks install*

d2sector
06-25-2005, 03:27 AM
How can you choose where the stats show up on your forums?

Pixelrift_will
07-13-2005, 01:05 PM
installed =D

derekivey
07-14-2005, 06:04 PM
Sweet going to install it now :D

Roms
07-22-2005, 11:55 PM
Thanks Erwin.

faast
08-22-2005, 09:41 PM
// Microstats hack
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>";
ksort($tempusagecache);
foreach ($tempusagecache AS $tempname => $times)
{
if ($_TEMPLATEQUERIES["$tempname"]) $debughtml .= "<center><span class=\"smallfont\">Uncached templates: <font color=\"red\"><b>$tempname</b></font> ($times)</span></center>";
}
$vartext = str_replace('</body>', "$debughtml\n</body>", $vartext);

}
//Microstats Hack


I'm not a coder by any means, but if I remove the above (in red) will that show to all users? Thanks. What I mean is, is the above code workable or will it do something horribly wrong?

derekivey
08-23-2005, 03:22 AM
Yes, if you remove that it will show to all users...

NJTy180
10-14-2005, 11:25 PM
Is there any reason I get this error message after installing this hack?

Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/********/********/includes/functions.php on line 2044


I saw that editing the functions.php file in Dreamweaver doesn't work, si I have used Notepad and Kate.

Tried copy and pasting - no joy.
Tried typing out entire hack - no joy.

Any ideas?
I got the same error, just on line 2033, I just gave up, oh well.....

Wisch
10-21-2005, 09:21 PM
Page generated in 0.08409 seconds with 9 queries

sweeeeet

David_R
02-11-2006, 03:27 AM
does this exists for 3.5 version ?
we have it installed and want to upgrade from 3.0.x version of our forum to 3.5

thanks.

SCuN
03-02-2009, 09:16 AM
work with 3.7?