【问题标题】:PHP script processing/cpu time (Not wall clock time)PHP 脚本处理/cpu 时间(不是挂钟时间)
【发布时间】:2017-11-02 09:31:08
【问题描述】:

我正在尝试分析我正在运行的一些 PHP 脚本。我已经在测量挂钟时间,但现在我想知道 CPU 为脚本分配了多少时间。

有什么方法可以测量脚本的 cpu 时间吗?我正在使用 php7.1

【问题讨论】:

  • 您应该查看 Xdebug for PHP 进行一些高级调试和分析:xdebug.org

标签: php performance time php-7 processing-efficiency


【解决方案1】:

AFAIK,您可以使用 xhprof 库来测量 CPU 时间。以下是有关如何使用库 https://tideways.io/profiler/xhprof-for-php7-php5.6 的指南。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2013-07-04
    • 1970-01-01
    • 1970-01-01
    • 2023-03-03
    • 2013-06-30
    • 2020-01-19
    • 1970-01-01
    相关资源
    最近更新 更多