gpt4 book ai didi

php - Xdebug 分析器输出文件

转载 作者:行者123 更新时间:2023-12-04 03:05:56 24 4
gpt4 key购买 nike

X 调试将输出作为部分而不是一个文件返回。
我正在使用 ubuntu 16,不知道为什么突然输出在几个文件中。
我遇到的问题是我无法在 Kcachegrind 中打开这些文件,因为输出在单独的文件中有不同的部分。
任何人?
提前致谢

最佳答案

使用默认配置 xdebug 为每个 PID 创建一个文件。

当您使用 ajax 调用分析网站时,浏览器将发出多个请求,并且这些请求可能由您的网络服务器的不同 PID/实例处理,因此您会获得多个文件。

你可以检查你的php.ini。有多个 xdebug 设置来控制分析数据的存储方式。例如:

xdebug.profiler_aggregate: Type: integer, Default value: 0 When this setting is set to 1, a single profiler file will be written for multiple requests. One can surf to multiple pages or reload a page to get an average across all requests. The file will be named .cachegrind.aggregate. You will need to move this file to get another round of aggregate data.

xdebug.profiler_append: Type: integer, Default value: 0 When this setting is set to 1, profiler files will not be overwritten when a new request would map to the same file (depending on the xdebug.profiler_output_name setting. Instead the file will be appended to with the new profile.

xdebug.profiler_output_name Type: string, Default value: cachegrind.out.%p

This setting determines the name of the file that is used to dump traces into. The setting specifies the format with format specifiers, very similar to sprintf() and strftime(). There are several format specifiers that can be used to format the file name.



查看更多 xdebug documentation

另一种选择是使用 File/Add menu in KCachegrind :

Adds a profile data file to the current window. By this, you can force multiple data files to be loaded into the same toplevel window even if they are not from the same run as given by the profile data file naming convention.

关于php - Xdebug 分析器输出文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44415275/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com