eldan88 Posted August 18, 2013 Share Posted August 18, 2013 I have been learning on how to debug PHP code. One of the things had a question on is using webgrind, to test performance of scripts. I was told that webgrind shouldn't be used on a production server. How can i test my code execution time, if its not widely used? Isn't that the best way to test for how long it takes for scripts to execute? Quote Link to comment https://forums.phpfreaks.com/topic/281326-question-about-using-webgring/ Share on other sites More sharing options...
cyberRobot Posted August 19, 2013 Share Posted August 19, 2013 Have you looked into microtime()? http://php.net/manual/en/function.microtime.php Quote Link to comment https://forums.phpfreaks.com/topic/281326-question-about-using-webgring/#findComment-1445802 Share on other sites More sharing options...
eldan88 Posted August 20, 2013 Author Share Posted August 20, 2013 I haven't looked at microtime. But is there a way to use something like web grind on a production sever? Quote Link to comment https://forums.phpfreaks.com/topic/281326-question-about-using-webgring/#findComment-1445912 Share on other sites More sharing options...
Zane Posted August 20, 2013 Share Posted August 20, 2013 (edited) //Page load echo "Page loaded in "; echo microtime() . " ms"; //Perform stress on the server for($i=0; $i echo "Loop finished in "; echo microtime() . "ms"; ?> Edited August 20, 2013 by Zane Quote Link to comment https://forums.phpfreaks.com/topic/281326-question-about-using-webgring/#findComment-1445914 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.