Pablo
Pablo

Reputation: 29519

Tool to profile php code

Looking for some [freeware/opensource] tool in order to make it easy to profile a big php project on win32 platform. Need to find out which part of code is most time consuming. It's hard to manually put timing function for each function, loop...

Upvotes: 0

Views: 1633

Answers (4)

Mike Dunlavey
Mike Dunlavey

Reputation: 40689

Yes, use XDebug, and once you're in it, use this technique, which works on any platform.

Don't think of it as measuring time.

Think of it as trying to ask, predominantly, What is it doing, and Why is it doing it?

Upvotes: 1

Charles
Charles

Reputation: 51421

In addition to the excellent xdebug (as mentioned by others), you can also look at xhprof.

Upvotes: 1

SeanJA
SeanJA

Reputation: 10384

xdebug works quite well http://xdebug.org

Also wincachegrind is a good tool for looking through the profiler's output. http://sourceforge.net/projects/wincachegrind/

As well as (if the profile file is small) webgrind http://code.google.com/p/webgrind/

Upvotes: 2

zombat
zombat

Reputation: 94237

You'll want to install and configure Xdebug. It's sort of the de-facto standard PHP debugging and profiling tool.

WinCacheGrind can crunch the profiling output. It's a bit buggy, but it does the job.

Upvotes: 6

Related Questions