1. We have moved from vBulletin to XenForo and you are viewing the site in the middle of the move. Though the functional aspect of everything is working fine, we are still working on other changes including the new design on Xenforo.
    Dismiss Notice

Gauging ur PHP Performance

Discussion in 'PHP' started by rohitdsouza, Dec 16, 2006.

  1. rohitdsouza

    rohitdsouza New Member

    The below is a code to gauge ur php performance

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

    ?>
     
  2. pradeep

    pradeep Team Leader

  3. daworm

    daworm New Member

    Gauging performance is also called PROFILING ...
     
    Last edited by a moderator: Dec 19, 2006
  4. kash

    kash New Member

    what is PHP

    can anyone outhere tell me what is PHP and what is it used for. ;)
     
  5. pradeep

    pradeep 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.
     
  6. raj4encoders

    raj4encoders New Member

    That's great! it's also called profiling.Merry Christmas.
    raj
    encoders
     
    Last edited by a moderator: Dec 21, 2006
  7. shabbir

    shabbir Administrator Staff Member

    Confine links to signatures only
     
  8. Krolik

    Krolik New Member

    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.
     
  9. pradeep

    pradeep Team Leader

Share This Page