plznty Posted January 26, 2011 Share Posted January 26, 2011 Is there any php function I can test how fast my server is performing, like how fast its carrying out a certain action so I can see its resource usage. Quote Link to comment Share on other sites More sharing options...
fredundant Posted January 26, 2011 Share Posted January 26, 2011 This will show you how long it is taking to lad the webpage. Not quote what you asked. But the only one I can think of at the moment. At the very top of the page <? $load_time = microtime(); $load_time = explode(' ',$load_time); $load_time = $load_time[1] + $load_time[0]; $page_start = $load_time; ?> Then before you close the body tag $load_time = microtime(); $load_time = explode(' ',$load_time); $load_time = $load_time[1] + $load_time[0]; $page_end = $load_time; $final_time = ($page_end - $page_start); $page_load_time = number_format($final_time, 4, '.', ''); echo("Page generated in " . $page_load_time . " seconds") Quote Link to comment 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.