Page 1 of 1

Monitoring performance of PHP in a non-intrusive manner

Posted: Mon Dec 08, 2008 3:18 am
by asaf.lahav
Hi all,
I am a fresh, right out of the box newbie with PHP... so bare with me :)

Is there a way to monitor the performance of a request to a PHP based web application?
I'm NOT looking for a method to do so via modifying PHP code pages... But to do that in a Non-Intrusive manner without modifying the code at all...

Thanks

Re: Monitoring performance of PHP in a non-intrusive manner

Posted: Mon Dec 08, 2008 3:25 am
by Eran
The xdebug extension can profile your scripts. It generates a cachegrind file that can be read by several applications, including WinCacheGrind and the web based webgrind.

Re: Monitoring performance of PHP in a non-intrusive manner

Posted: Mon Dec 08, 2008 3:50 am
by asaf.lahav
Thanks Pytrin...
Is this tool aimed at monitoring performance in production?
Debug tools tend to be very heavy on the server. As I understand from the XDebug documentation it is intended for use over a Dev or QA environment rather than production.

Re: Monitoring performance of PHP in a non-intrusive manner

Posted: Mon Dec 08, 2008 3:53 am
by Eran
yes it is intended mostly for dev and staging - profiling takes a hit on the server, there's no avoiding it. You can still run it in production while the server load is load (not many users).

There are commercial solutions such as the Zend Platform that might better for production use.