【问题标题】:How to limit cachegrind files created by xdebug-profiler如何限制 xdebug-profiler 创建的 cachegrind 文件
【发布时间】:2014-05-12 11:44:51
【问题描述】:

有没有办法限制 cachegrind 文件(xdebug 分析输出)? 我想启用 xdebug.profile 来调试整个项目(不仅仅是触发器),但如果有人忘记禁用它,我不希望磁盘已满。

我在the profiler documentation 中没有找到类似的选项。

【问题讨论】:

    标签: debian valgrind cachegrind xdebug-profiler webgrind


    【解决方案1】:

    如文档所述 (http://www.xdebug.org/docs/profiler),请在适当的 .ini 文件中使用这些设置 - :

    xdebug.profiler_enable = 0 
    xdebug.profiler_enable_trigger = 1
    

    然后,不会对每个请求进行分析,而只会分析那些在 GET/POST/COOKIE 中具有 XDEBUG_PROFILE 变量的请求。

    如果您不想使用触发方法,那么我想您需要一个 cron 作业(或类似作业)来非常频繁地清理 /tmp(或任何 xdebug.profiler_output_dir 设置)。

    【讨论】:

      猜你喜欢
      • 2014-04-15
      • 2016-11-20
      • 2021-03-16
      • 1970-01-01
      • 2015-01-26
      • 2017-06-09
      • 1970-01-01
      • 2022-11-26
      • 2011-09-13
      相关资源
      最近更新 更多