Quote:
Originally posted by nakkid
strange indeed. so you get those values only with the microtime from php.net? as a .php file? or part of vBulletin?
|
Nakkid, yes, I used VBulletin files, double checked your v1.7 hack
statements against my modified files. Last, as said, I put the
getmicrotime() function in
admin/functions.php exactly
as it's described on
www.php.net
This is exactly what I did: I used two files index.php, called
index224_plain.php and index224_hackd.php and uploaded to
forum home dir, respectively the original 2.2.4 version and the
hacked one.
Both with some mods:
PHP Code:
// just after
require('./global.php');
// put
$custompagebeginmicrotime = (float)getmicrotime();
// Then, in 4-5 different points of the two files (same points), i put these two rows:
$bulkloadmicrotime = number_format(getmicrotime()-$custompagebeginmicrotime,7);
echo "<font size=1 face='arial'>Bulk load microtime [qrs=$query_count] (xxxx breakpoint identification) = <b>$bulkloadmicrotime</b></font><br>";
Besides, in
global.php with an
PHP Code:
echo "<h1>Pagestarttime Global reset</h1>"
just after the
$pagestarttime=microtime() at the beginning
of the page, I ensured that script is called only ONCE by index.php...
Note: last two days, for some unexplained reason, my server
disabled GZip and any other encoding ... I hope it's a short time event...
Code:
PLAIN index.php
---------------
Bulk load microtime [qrs=6] (start time) = 0.0000969
Bulk load microtime [qrs=13] (after processing main SELECT group) = 0.0069339
Bulk load microtime [qrs=19] (after processing most SELECTs and some templates) = 0.0228729
Bulk load microtime [qrs=19] (before processing main template) = 0.0863299
{ getmicrostats }= Page (81.17% PHP + 18.83% MySQL) with 19 queries generated in 0.1926436
Bulk load microtime [qrs=20] (after processing all templates) = 0.7915579
HACKED index.php
----------------
Bulk load microtime [qrs=6] (start time) = 0.0000930
Bulk load microtime [qrs=26] (after processing main SELECT group) = 0.5236299
Bulk load microtime [qrs=33] (after processing most SELECTs and some templates) = 0.5396340
Bulk load microtime [qrs=38] (before processing main template) = 0.6587319
{ getmicrostats }= Page (20.74% PHP + 79.26% MySQL) with 38 queries generated in 0.7506131
Bulk load microtime [qrs=39] (after processing all templates) = 2.1796360
As you can see, the results pointed out most of the page time is
taken by the forumhome template processing. Much more than all
the SELECTs (38 with hacks, 19 with the plain version). And the
{ getmicrostats } is evalued BEFORE the
template is loaded and processed. Infact that value is almost
similar to mine as computed immediately before the eval
("forumhome template").
Of course, the doubled number of queries in the hacked version
reversed also the percentage ratio of php vs. sql ...
Interesting, isn't it ?
Hope I was able to explain myself
:stupid:
Thanks.