0

I am new to profiling. I am trying to profile my PHP with xdebug.

The cachegrind file is created but has no significant content

I have set xdebug.profiler_enable_trigger = 1 xdebug.profiler_output_name = cachegrind+%p+%H+%R.cg

I call my page with additional GET parameter ?XDEBUG_PROFILE=1 My cachegrind file is generated but has no significant content

Here is my output:

version: 1
creator: xdebug 2.7.0alpha1 (PHP 7.0.30-dev)
cmd: C:\WPNserver\www\DMResources\Classes\VendorClasses\PHPMySQLiDatabase\MysqliDb.php
part: 1
positions: line

events: Time Memory

fl=(1)
fn=(221) php::mysqli->close
1244 103 -14832

fl=(42)
fn=(222) MysqliDbExt->__destruct
1239 56 0
cfl=(1)
cfn=(221)
calls=1 0 0
1244 103 -14832

That's it - I must be missing something fundamental.

NormB
  • 41
  • 5

1 Answers1

0

I think you hit this bug in xdebug. As suggested by Derick in the issue tracker, you can workaround this by adding %r to the profiler output name. eg: xdebug.profiler_output_name = cachegrind+%p+%H+%R+%r.cg (with %r adding a random number to the name)

user24525
  • 423
  • 3
  • 8