Script execution time in PHP -
i find out script execution of script. used below code.
$time_start = microtime(true); //here script extracting 13,000 product using api $time_end = microtime(true); $execution_time = ($time_end - $time_start)/60; echo '<b>total execution time:</b> '.$execution_time.' mins';
this script working in localhost not working in production server. on other hand if reduce product quantity 4,000 working in production server.
why happening so??
thanks
update
if add echo 'mouse';
@ end of script not printing.
it might case script facing time out.
so, please try add time out limit @ top of script file.
set_time_limit(0); $time_start = microtime(true); //here script extracting 13,000 product using api $time_end = microtime(true); $execution_time = ($time_end - $time_start)/60; echo '<b>total execution time:</b> '.$execution_time.' mins';
Comments
Post a Comment