Rackspace 云站点上的 PHP (Zend Framework) 代码分析
我有一个基于 Zend Framework 编写的应用程序,该应用程序托管在 Rackspace 云站点上。我希望能够进行代码分析,但我不知道从哪里开始。我见过的代码分析工具需要安装在服务器上。
我已经使用 Zend_Log_Writer_Firebug 进行查询分析,并且希望使用类似的方法进行代码分析。我有什么选择?
I have an application written on top of the Zend Framework that is hosted on Rackspace Cloud Sites. I want to be able to do code profiling, but I don't know where to begin. The code profiling tools I've seen require installation on the server.
I already use Zend_Log_Writer_Firebug
for query profiling, and would like something similar for code profiling. What are my options?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
要分析一个程序,您不可避免地需要在内存中加载另一个程序,因此无法在“外部”执行此操作。
Xdebug 或 Zend Debugger 允许您分析代码,并且可以将其设置为远程使用它,但是您仍然需要将其安装在您的服务器上。
您还可以查看 APD(代表高级 PHP 调试器),它是 PECL 的一部分。
您可以找到解决方法或“PHP”解决方案,但我认为这两种方法都不准确或有价值。
无论如何,您不应该在实时服务器上安装此类工具,但是,您可以通过 PEAR 在您的开发环境中轻松安装 Xdebug。
结果不需要准确,无论您使用什么环境,比例应该保持不变。
无论您的服务器是 I7 Core Xeon 6Ghz 还是其他,以及您的开发服务器是旧的 Cyrix K6,当出现瓶颈时,它们都会出现。
To profile a program, you irremediably need another program loaded in memory, so there is no way to do it "outside".
Xdebug or Zend Debugger allows you to profile your code, and you can set it up to use it remotely, but you still need to install it your server.
You can also take a look at APD (stands for Advanded PHP Debugger) which is part of the PECL.
You could find workaround, or 'PHP' solution, but neither would be accurate or valuable I think.
Anyway, you should not install such tools on live server, however, you can easily install Xdebug through PEAR on your development environment.
The result doesn't need to be accurate, the proportion should remains the same, whatever the env you use.
It doesn't matter if your server is I7 Core Xeon 6Ghz or whatever, and your development server is an old Cyrix K6, when there are bottlenecks, they'll be here and there.
由于您已经在使用 Zend_Log_Writer_Firebug ,因此您可能已经尝试过 zfdebug。
xhprofile 怎么样?我没用过,但尝试一下可能会很好:)
As you are already using Zend_Log_Writer_Firebug , you may have tried zfdebug.
What about xhprofile ? I have not used, but may be good to try :)