Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Speed check

  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Location
    Singapore
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Speed check

    Hi,
    Is there a script to check for the retrieval speed of a page? I just want to know
    the speed so I can optimize my code.

    Thanks.

  • #2
    New Coder
    Join Date
    Apr 2005
    Posts
    97
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You could do...

    PHP Code:
    $startime microtime(); 
    at the start of your code
    and

    PHP Code:
    $endtime microtime();
    $totaltime $endtime-$startime
    This will give you the time it took the script to run in microseconds.

    Is that what you're looking for?

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Location
    Singapore
    Posts
    130
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Hey thanks!
    Looks promising. Does this includes the time taken to connect to a database, retrieve the result and back?

  • #4
    New Coder
    Join Date
    Sep 2005
    Location
    Berlin, Germany
    Posts
    23
    Thanks
    0
    Thanked 0 Times in 0 Posts
    yes, it does


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •