The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
How hard would it be to have how long it took mySQL and/or php to do their work for each page displayed?
Like if I was to do index.php?showqueries=1 I'd get: Quote:
|
#2
|
||||
|
||||
Perhaps you already can do this, but it would be interesting to track the averages per forum from the admin panel for optimization purposes.
|
#3
|
||||
|
||||
I had a quick look in my global.php (not admin) and there was a few references to the showqueries thing - nothing easily obvious for me to spot and hack though :/
|
#4
|
|||
|
|||
On my actual site, I have something like this in effect.
I used the following code to achieve this effect: (from my index, the title is the following) return $dirgotronix.net[content/News]; // 1.724 sec. Here's the code: PHP Code:
|
#5
|
|||
|
|||
its already added in to show queries instead of content just add &explain=1 to any vbulletin page, i think it should be able to be modified though to show content and queries instead of just the query info.
|
#6
|
||||
|
||||
Thought I would bump this - I've chewed it over and not worked out how to do it. I still think it would be a great hack. However I don't especially need it, but I'm sometimes unsure if the forums are slow, or my connection is c**p. Its also nice to show off a quick server.
Any thoughts? |
#7
|
||||
|
||||
In global.php (forum folder) replace:
Code:
if (isset($showqueries)) { $pagestarttime=microtime(); } Code:
// if (isset($showqueries)) { $pagestarttime=microtime(); // } Code:
if ($showqueries) { $pageendtime=microtime(); $starttime=explode(" ",$pagestarttime); $endtime=explode(" ",$pageendtime); $totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1]; $vartext.="<!-- Page generated in $totaltime seconds with $query_count queries -->"; } Code:
// if ($showqueries) { $pageendtime=microtime(); $starttime=explode(" ",$pagestarttime); $endtime=explode(" ",$pageendtime); $totaltime=$endtime[0]-$starttime[0]+$endtime[1]-$starttime[1]; $vartext.="<!-- Page generated in $totaltime seconds with $query_count queries -->"; // } Adding it in the footer would require some more hacking (because the footer template is eval()'ed right when the script stats executing, so it doesn't have this info when it is eval()'ed). |
#8
|
||||
|
||||
Damn thats great
Thanks for looking into that one, even if it isn't displayed on the page its a good thing to have imo. Good work! Many thanks. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|