Monitoring performance of PHP in a non-intrusive manner

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
asaf.lahav
Forum Newbie
Posts: 2
Joined: Mon Dec 08, 2008 3:11 am

Monitoring performance of PHP in a non-intrusive manner

Post 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
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

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

Post 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.
asaf.lahav
Forum Newbie
Posts: 2
Joined: Mon Dec 08, 2008 3:11 am

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

Post 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.
User avatar
Eran
DevNet Master
Posts: 3549
Joined: Fri Jan 18, 2008 12:36 am
Location: Israel, ME

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

Post 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.
Post Reply