Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/apache/8.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
分析在apache中运行的PHP_Php_Apache_Profiling - Fatal编程技术网

分析在apache中运行的PHP

分析在apache中运行的PHP,php,apache,profiling,Php,Apache,Profiling,我想知道在apache上运行的应用程序调用了哪些函数以及每个请求花费了多少时间 是否有任何工具或其他方式可以获取这些数据。 我还想知道每个函数需要多少时间 应用程序正在运行,无法停止。 因此,我需要在运行环境本身中获取详细信息。 提前感谢。有两个PHP评测工具, 比如 有两个PHP评测工具, 比如 Xdebug可以在或中进行分析。Xdebug可以在或中进行分析。最常用的行业工具之一是: 我已经虔诚地使用它很长时间了!在其头版中,它执行以下操作: * stack traces and

我想知道在apache上运行的应用程序调用了哪些函数以及每个请求花费了多少时间

是否有任何工具或其他方式可以获取这些数据。
我还想知道每个函数需要多少时间

应用程序正在运行,无法停止。
因此,我需要在运行环境本身中获取详细信息。

提前感谢。

有两个PHP评测工具,
比如


    • 有两个PHP评测工具,
      比如


      Xdebug可以在或中进行分析。

      Xdebug可以在或中进行分析。

      最常用的行业工具之一是:

      我已经虔诚地使用它很长时间了!在其头版中,它执行以下操作:

      * stack traces and function traces in error messages with:
            o full parameter display for user defined functions
            o function name, file name and line indications
            o support for member functions
      * memory allocation
      * protection for infinite recursions"
      
      “Xdebug扩展通过提供大量有价值的调试信息帮助您调试脚本。Xdebug可以提供的调试信息包括以下内容:

      * stack traces and function traces in error messages with:
            o full parameter display for user defined functions
            o function name, file name and line indications
            o support for member functions
      * memory allocation
      * protection for infinite recursions"
      

      这方面最常用的行业工具之一是:

      我已经虔诚地使用它很长时间了!在它的头版,它做了以下几点:

      * stack traces and function traces in error messages with:
            o full parameter display for user defined functions
            o function name, file name and line indications
            o support for member functions
      * memory allocation
      * protection for infinite recursions"
      
      “Xdebug扩展通过提供大量有价值的调试信息,帮助您调试脚本。Xdebug可以提供的调试信息包括以下内容:

      * stack traces and function traces in error messages with:
            o full parameter display for user defined functions
            o function name, file name and line indications
            o support for member functions
      * memory allocation
      * protection for infinite recursions"
      

      这取决于您想要的是主动分析还是被动分析

      诸如之类的被动工具在后台默默地工作,并通过牺牲少量计算资源来收集有关所有请求的少量信息。它们通常有关于整个服务器堆栈的更多信息。它们通常用于生产环境,这听起来像是您所需要的

      活动探查器用于开发,每个请求只运行一次,专门收集有关您正在处理的应用程序部分的大量信息,但代价是性能大幅下降。最常见的PHP活动探查器可能是

      分析Xdebug数据的方法: 注意:如果使用虚拟机、vagrant、docker等,请确保将输出目录设置为可在虚拟机外部访问的共享卷

      e、 g

      (php.ini)
      xdebug.profiler\u output\u dir=“/project\u root/tmp”

      如果使用PHPStorm:

      • Tools>analysisxdebug分析器快照…
      对于在上使用Xdebug的用户:

      使用自制安装qcachegrind和AppViz

      • brew安装qcachegrind

      • brew安装graphviz

      然后从命令行运行它:

      qcachegrind cachegrind.out.1394


      或者只需运行qcachegrind并使用GUI导航器打开xdebug生成的cachegrind文件,这取决于您想要的是主动还是被动评测

      诸如之类的被动工具在后台默默地工作,并通过牺牲少量计算资源来收集有关所有请求的少量信息。它们通常有关于整个服务器堆栈的更多信息。它们通常用于生产环境,这听起来像是您所需要的

      活动探查器用于开发,每个请求只运行一次,专门收集有关您正在处理的应用程序部分的大量信息,但代价是性能大幅下降。最常见的PHP活动探查器可能是

      分析Xdebug数据的方法: 注意:如果使用虚拟机、vagrant、docker等,请确保将输出目录设置为可在虚拟机外部访问的共享卷

      e、 g

      (php.ini)
      xdebug.profiler\u output\u dir=“/project\u root/tmp”

      如果使用PHPStorm:

      • Tools>analysisxdebug分析器快照…
      对于在上使用Xdebug的用户:

      使用自制安装qcachegrind和AppViz

      • brew安装qcachegrind

      • brew安装graphviz

      然后从命令行运行它:

      qcachegrind cachegrind.out.1394


      或者只运行qcachegrind并使用GUI navigator打开xdebug生成的cachegrind文件

      问题是含糊不清的,您是指评测apache内部函数调用还是apache上运行的网页?还有涉及到的编程语言吗?我想分析内部函数调用。编程语言是PHP,数据库是MySQL。问题是含糊不清的,您是指分析apache内部函数调用还是分析apache上运行的网页?还有涉及的编程语言吗?我想分析一下内部函数调用。编程语言是PHP,数据库是Mysql