PHP script execution time tracking wallclock time

exucution time

A simple way to find out execution time of php script without lots of calculation is tracks the wallclock time. Compare to tracking CPU time, it also include time that PHP is sat waiting for external resources such as disks or databases, which is not used for max_execution_time.

$time_start = microtime(true);
//scripts, db querys etc goes here
echo 'Execution time load report package: ', $execution_time);

Output: Execution time get user: 0.00023317337036133

By Keenlio, December 1, 2014

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *


× nine = 63

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>