News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Derick Rethans' Blog:
Xdebug and tracing memory usage
November 13, 2009 @ 08:15:09

Derick Rethans has a new post today talking about using the Xdebug tool to track the memory usage in your application with some of its profiling capabilities, specifically function traces.

Function traces log every include, function call and method call to a file. If the xdebug.trace_format setting is set to "1" then the trace file is an easy-to-parse tab separated format. The information that is logged includes the time-index when the function started and ended, and it also contains the amount of memory that was in use when entering the function, as well as when leaving it.

He's written up a sample script (you can grab it from the Xdebug CVS server) that you can run on a file and push all ouf the output to the trace file for easy parsing. The script reads in the file and displays the results in a nice format on the command-line (easily adaptable for a web frontend).

0 comments voice your opinion now!
xdebug memory trace usage tutorial


blog comments powered by Disqus

Similar Posts

Samisa Abeysinghe's Blog: Tracing SOAP Messages (and Installing via PECL)

NETTUTS.com: How To Build a Widget to Display your Buzzing

Sebastian Bergmann's Blog: Testing Your Privates

PHPMac.com: Building and Installing Apache 2.2.2 and PHP 5.1.3 (or 5.1.4) on Mac OS X 10.4.6

Web Developer Juice: 11 easy steps for installing Apache ActiveMQ and configuring it for PHP applica


Community Events

Don't see your event here?
Let us know!


podcast voicesoftheelephpant extension example series conference release interview library introduction php7 laravel opinion performance api symfony2 community framework version application

All content copyright, 2015 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework