PHP 项目基准测试分步指南
谁能指导我如何加载测试/基准测试用普通程序 PHP(无框架)和 MySQL 编写的项目来识别瓶颈?
该项目使用SESSION来存储一些值。
我有 WAMP 的最新版本!
[在 SO 上,我找到了 JMeter 来完成这项工作,但是没有分步指南,我也没有在 JMeter 的网站上找到它。寻求您的帮助。]
Can anyone guide me how to load test/benchmark a project written in plain procedural PHP (no framework) and MySQL to identify the bottleneck ?
The project uses SESSION to store some values.
I've the last version of WAMP !
[On SO i found JMeter to do the job, but there was no step by step guide, neither i found it on the JMeter's site. Looking for help from you.]
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
基于单元测试的开发。
这允许您生成无错误的代码。它还以时间为基准。
PHPUnit 绝对是正确的选择
Unit Test based development.
This allows you to produce bug free code. It also benchmarks for time.
And PHPUnit definitely is the way to go
使用 PHPUnit 进行测试:
http://jsdoodnauth .wordpress.com/2008/11/05/installing-wamp-and-phpunit-on-windows/
Use PHPUnit for testing:
http://jsdoodnauth.wordpress.com/2008/11/05/installing-wamp-and-phpunit-on-windows/
如果您想分析您的代码以找出哪一部分始终需要花费时间,那么您正在寻找一个分析器。
对于 WAMP,我推荐 xdebug profiler 和 webgrind 以可视化数据。
另一方面,如果您想知道您的网站可以承受多少,您应该查看 Apachebench,它应该随 WAMP 一起提供。
您没有指定您的基准测试需求有多复杂,但 apachebench 应该使之成为可能。
If you want to profile your code to find out, which part of it takes all the time, you're looking for a profiler.
With WAMP, I'd recommend the xdebug profiler with webgrind to visualilze the data.
On the other hand, if you want to know, how much your site can take, you should take a look at Apachebench, which should come with WAMP.
You didn't specify, how complex your benchmarking needs are, but apachebench should make it possible.