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. Link to comment https://forums.phpfreaks.com/topic/225753-php-script-to-test-server-speed/ 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") Link to comment https://forums.phpfreaks.com/topic/225753-php-script-to-test-server-speed/#findComment-1165527 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.