How to measure the execution of a PHP script in a processor loop?

How can I measure the execution of a PHP script in a processor loop? I don't need runtime, because if the script connects to db or an external API, it is waiting and CPU resources are not consuming.

EDIT: PHP <5.3, Windows

+5
source share
2 answers

Take a look at the getrusage () function . He can provide you with something useful.

+2
source

Try using a profiler. ( http://xdebug.org/docs/profiler )

, zend , , , zend, , ..

, , , "" (http://en.wikipedia.org/wiki/Mock_object) , , - , SQL-:)

+2

All Articles