1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Gauging ur PHP Performance

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

  1. rohitdsouza

    rohitdsouza New Member

    Joined:
    Dec 16, 2006
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    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

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
  3. daworm

    daworm New Member

    Joined:
    Dec 13, 2006
    Messages:
    5
    Likes Received:
    1
    Trophy Points:
    0
    Gauging performance is also called PROFILING ...
     
    Last edited by a moderator: Dec 19, 2006
  4. kash

    kash New Member

    Joined:
    Oct 13, 2006
    Messages:
    10
    Likes Received:
    0
    Trophy Points:
    0
    what is PHP

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

    pradeep Team Leader

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:
    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

    Joined:
    Dec 21, 2006
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    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

    Joined:
    Jul 12, 2004
    Messages:
    15,292
    Likes Received:
    365
    Trophy Points:
    83
    Confine links to signatures only
     
  8. Krolik

    Krolik New Member

    Joined:
    Feb 16, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Home Page:
    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

    Joined:
    Apr 4, 2005
    Messages:
    1,646
    Likes Received:
    86
    Trophy Points:
    0
    Occupation:
    Programmer
    Location:
    Kolkata, India
    Home Page:

Share This Page