4
Looking to profile my web app, I have added the following settings to my Applications php.ini file:


zend_extension                  = "C:\hqp\xampp_1.7.4\php\ext\php_xdebug.dll"
xdebug.profiler_append          = 0
xdebug.profiler_enable          = 1 
xdebug.profiler_output_dir      = "c:\hqp\xampp_1.7.4\tmp\profiles"
xdebug.profiler_output_name     = "cachegrind.out.%s"
xdebug.profiler_enable_trigger  = 1

在 httpd.conf 文件中,使用 php 值 auto_prepend 对文件进行 auto_prepend。生成的cachegrind.out.*文件带有这个文件的名称(%s 修饰符xdebug.profiler_output_name),而不是我实际要分析的文件(例如 index.php 文件没有对应的cachegrind.out.filepath_index.php

知道我在这里缺少什么吗?

4

1 回答 1

1

可能是您正在生成两个文件,而第二个文件覆盖了第一个文件。

您可以在 php.ini 中更改以下参数:

xdebug.profiler_append=1

这应该将两个调用附加到同一个文件中。来源:https ://xdebug.org/docs/profiler

xdebug.profiler_output_name = cachegrind.out.%u.%p.%r

这应该确保如果有 2 个文件,它们的名称应该不同。

https://xdebug.org/docs/all_settings#trace_output_name用于其他修饰符。

于 2018-05-23T08:06:38.573 回答