arrow_back
Back

Xdebug profiler in PHP: cachegrind output and configuration

Andrew Dorokhov Andrew Dorokhov schedule 1 min read
menu_book Table of Contents

To set up Xdebug for profiling we should set the next parameters:

xdebug.mode = profile
xdebug.output_dir = /app/runtime/xdebug

To generate a profile report, we need to access a PHP script or application in a way that triggers the execution of the code we want to profile. For example, we can open a PHP application in a web browser or run a PHP script from the command line.

The files will have a .cachegrind extension.

Analyzing report files

To analyze the profile data, you can use various tools such as:

code

Need Help with Development?

Happy to help — reach out via the contacts or go straight to my Upwork profile.

work View Upwork Profile arrow_forward
Next Article

XHProf: hierarchical PHP profiling and call graphs

arrow_forward