Step by step guide for benchmarking PHP project

牧云@^-^@ 提交于 2019-12-08 10:12:06

问题


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.]


回答1:


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.




回答2:


Use PHPUnit for testing:

http://jsdoodnauth.wordpress.com/2008/11/05/installing-wamp-and-phpunit-on-windows/




回答3:


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



来源:https://stackoverflow.com/questions/6092688/step-by-step-guide-for-benchmarking-php-project

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!