SitePoint Sponsor

User Tag List

Results 1 to 2 of 2

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Sep 2000
    Location
    Seattle, WA area
    Posts
    104
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I've just about finished writing the PHP/MySQL backend for my web site and I'd like to benchmark it. How can I tell how long it took to run the script and how much CPU time it used? Thanks.

  2. #2
    SitePoint Wizard
    Join Date
    Jul 1999
    Location
    Chicago
    Posts
    2,629
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The easiest way to do this is to install PHP as a CGI executable (most web hosts use mod_php and CGI PHP) and then type: time php script.php at the shell.

    If not, you need to take the time at the start and end of the script and subtract the first from the second. It won't be accurate though.


Bookmarks

Posting Permissions

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