PHP code profiling using XDebug   By Gennady Feldman June 16, 2009
Overview <ul><li>Introduction </li></ul><ul><li>Profiling with Xdebug </li></ul><ul><li>Enabling Profiling in Xdebug </li>...
Introduction <ul><li>Xdebug is a powerhouse extension for PHP. </li></ul><ul><li>It has a ton of features like debugging, ...
Profiling with Xdebug <ul><li>Xdebug can generate cachegrind files that contain profiling information. </li></ul><ul><li>I...
WinCacheGrind
KCacheGrind Screenshot
WebGrind Screenshot
Enabling Profiling <ul><ul><li>xdebug.profiler_append </li></ul></ul><ul><ul><ul><li>Default: 0 </li></ul></ul></ul><ul><u...
Summary <ul><li>Xdebug is a very powerful extension with a ton of great features.  </li></ul><ul><li>We only covered one t...
Resources <ul><li>Xdebug:  http://www.xdebug.org </li></ul><ul><li>WinCacheGrind:  http:// sourceforge .net/projects/ winc...
 
Q & A
Upcoming SlideShare
Loading in …5
×

Php Code Profiling Using X Debug

2,223 views

Published on

Presented by Gennady Feldman at Web Peformance for PHP developers (NY Web Performance Meetup & NY PHP).

Xdebug is a very powerful PHP extension that should be in the toolbox of any PHP developer. In this quick presentation we will do a quick introduction into some of the things Xdebug is capable of and what it can do for you. We'll cover a number of Xdebug features like remote debugging and code profiling. Forget those print and echo statements as your debugging aids. Gennady will share some tips and tricks (time permitting) of how to be a more efficient and productive PHP developer.

http://www.nyphp.org/content/presentations/

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,223
On SlideShare
0
From Embeds
0
Number of Embeds
134
Actions
Shares
0
Downloads
56
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide

Php Code Profiling Using X Debug

  1. 1. PHP code profiling using XDebug By Gennady Feldman June 16, 2009
  2. 2. Overview <ul><li>Introduction </li></ul><ul><li>Profiling with Xdebug </li></ul><ul><li>Enabling Profiling in Xdebug </li></ul><ul><li>Summary </li></ul><ul><li>Q & A </li></ul>
  3. 3. Introduction <ul><li>Xdebug is a powerhouse extension for PHP. </li></ul><ul><li>It has a ton of features like debugging, tracing, profiling and analyzing problems with PHP code. </li></ul><ul><li>Today we will focus on some of it’s profiling abilities. </li></ul>
  4. 4. Profiling with Xdebug <ul><li>Xdebug can generate cachegrind files that contain profiling information. </li></ul><ul><li>It can be used to find bottle-necks in your scripts. </li></ul><ul><li>You need a tool to read these files. </li></ul><ul><li>Some of your options are: WinCacheGrind, KCacheGrind, webgrind. </li></ul><ul><li>These tools allow you to analyze script execution (execution time breakdown, # function calls, etc). </li></ul>
  5. 5. WinCacheGrind
  6. 6. KCacheGrind Screenshot
  7. 7. WebGrind Screenshot
  8. 8. Enabling Profiling <ul><ul><li>xdebug.profiler_append </li></ul></ul><ul><ul><ul><li>Default: 0 </li></ul></ul></ul><ul><ul><li>xdebug.profiler_enable </li></ul></ul><ul><ul><ul><li>Default: 0 </li></ul></ul></ul><ul><ul><li>xdebug.profiler_output_dir </li></ul></ul><ul><ul><ul><li>Default: /tmp </li></ul></ul></ul><ul><ul><li>xdebug.profiler_output_name </li></ul></ul><ul><ul><ul><li>Default: cachegrind.out.%p </li></ul></ul></ul>
  9. 9. Summary <ul><li>Xdebug is a very powerful extension with a ton of great features. </li></ul><ul><li>We only covered one tiny thing that this extension can do. </li></ul><ul><li>This is a MUST in development environment. </li></ul><ul><li>Come see me speak at NYPHP August 25, 2009 covering Xdebug from A to X. </li></ul>
  10. 10. Resources <ul><li>Xdebug: http://www.xdebug.org </li></ul><ul><li>WinCacheGrind: http:// sourceforge .net/projects/ wincachegrind / </li></ul><ul><li>KCacheGrind: http://kcachegrind.sourceforge.net/ </li></ul><ul><li>WebGrind: http://code.google.com/p/webgrind/ </li></ul><ul><li>My blog: http://www.gena01.com/ blog / </li></ul>
  11. 12. Q & A

×