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

Popular posts from this blog

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -