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";

?>
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Also this http://www.go4expert.com/showthread.php?t=273
0
daworm's Avatar, Join Date: Dec 2006
Light Poster
Gauging performance is also called PROFILING ...

Last edited by shabbir; 19Dec2006 at 16:47.. Reason: Confine links to signatures only
0
kash's Avatar
Go4Expert Member
can anyone outhere tell me what is PHP and what is it used for.
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
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.
0
raj4encoders's Avatar
Newbie Member
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
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
Confine links to signatures only
0
Krolik's Avatar, Join Date: Feb 2007
Light Poster
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.
0
pradeep's Avatar, Join Date: Apr 2005
Team Leader
Here is one http://www.nusphere.com/products/php_profiler.htm