Gauging ur PHP Performance

rohitdsouza's Avatar author of Gauging ur PHP Performance
This is an article on Gauging ur PHP Performance in PHP.
Rated 5.00 By 1 users
The below is a code to gauge ur php performance

Code: PHP
<?php
function micro_time_val($mytime)
{
    $gettime=explode(" ",$mytime);
    $msec=(double)$gettime[0];
    $sec=(double)$gettime[1];
    return ($sec + $msec);
}
$starttime=micro_time_val(time());

//do some tasks

$endtime=micro_time_val(time());

$difftime=$endtime-$starttime;

print "Your Script Response time is:$difftime";

?>
Team Leader
16Dec2006,17:18   #2
pradeep's Avatar
Also this http://www.go4expert.com/showthread.php?t=273
Light Poster
19Dec2006,16:35   #3
daworm's Avatar
Gauging performance is also called PROFILING ...

Last edited by shabbir; 19Dec2006 at 16:47.. Reason: Confine links to signatures only
Go4Expert Member
19Dec2006,16:38   #4
kash's Avatar
can anyone outhere tell me what is PHP and what is it used for.
Team Leader
20Dec2006,10:32   #5
pradeep's Avatar
Kash, PHP (PHP: Hypertext Preprocessor) is a programming language originally designed for producing dynamic Web pages.PHP is used mainly in server-side application software, but can be used from a command line interface or in standalone graphical applications.
Newbie Member
21Dec2006,10:19   #6
raj4encoders's Avatar
That's great! it's also called profiling.Merry Christmas.
raj
encoders

Last edited by shabbir; 21Dec2006 at 10:36.. Reason: Confine links to signatures only
Go4Expert Founder
21Dec2006,10:36   #7
shabbir's Avatar
Confine links to signatures only
Light Poster
16Feb2007,15:15   #8
Krolik's Avatar
Are there any professional profilers for PHP, as are for Java and C++? It would be nice to have a tool that can easily spot bottlenecks.
Team Leader
16Feb2007,15:45   #9
pradeep's Avatar
Here is one http://www.nusphere.com/products/php_profiler.htm