各PHP框架 性能测试(Yaf 2.1 Benchmark)
2013-10-14 12:29
531 查看
http://www.ruilog.com/blog/view/b6f0e42cf705.html
http://www.laruence.com/2011/12/02/2333.html/comment-page-1#comment-168419
Case
Test Simple "Hello World" page output, Simple MVC logic(Router -> Controller -> Viewer), No Database Connections, No complex logic.
Hardware platform
CPU: Intel Core i5 750 (2.67GHz x4)
RAM: 4GB
Software Environment
Debian 6.0.4 x86_64 (2.6.32-41)
apache 2.2.16 (mpm-prefork,mod-php5)
php 5.3.10
php-apc 3.1.9 (Optimization for include/require)
Copy all projects to /dev/shm/* (Optimization for files read/write)
Frameworks list
* zf: Zend Framework
Site: http://framework.zend.com
Ver: 1.11.11
* zf2: Zend Framework
Site: http://framework.zend.com
Site: https://github.com/zendframework/ZendSkeletonApplication
Ver: 2.0.0-beta1
* symfony: symfony
Site: http://www.symfony-project.org
Ver: 2.0.0
* cakephp: CakePHP
Site: http://cakephp.org
Ver: 2.0.4
* ci: CodeIgniter
Site: http://codeigniter.com
Ver: 2.1.0
* yii: Yii Framework
Site: http://www.yiiframework.com
Ver: 1.1.8
* micromvc4: MicroMVC
Site: http://www.micromvc.com
Ver: 4.0.0
* laravel: Laravel, A PHP Framework For Web Artisans
Site: http://laravel.com
Ver: 2.0.2
* slim: Slim Framework
Site: http://www.slimframework.com
Ver: 1.5.0
* yaf: Yet Another Framework in PHP Extension
Site: http://code.google.com/p/yafphp
Ver: 2.1.3-beta (yaf.cache_config=1)
* FuelPHP: Simple, Flexible, Community driven Web Framework
Site: http://fuelphp.com/
Ver: 1.1
* ColaPHP:
Site: http://code.google.com/p/colaphp/
Ver: 1.2-ga
# XHProf: A Hierarchical Profiler for PHP
Site: http://pecl.php.net/xhprof
Ver: 0.9.2
# The source code of this testing:
Source: https://github.com/eryx/php-framework-benchmark
1. Apache Benchmark
Requests pre second (-c 100 -n 30000), the bigger is better
Requests pre second (-c 200 -n 50000), the bigger is better
2. System LoadAvg
System LoadAvg in 1 Minute when Apache Benchmark Complete,
the smaller is better (-c 100 -n 30000)
3. Memory usage
How many memory usage in one "hello world" page. the smaller is better.
4. Response time
The time of page request to response.
5. Number of function calls (Facebook XHProf)
The number of functions calls in one "hello world" page.
The detail of function calls map
6. Number of Files
The number of files included or required in one "hello world" page. the smaller is better.
Changelog:
* v20111201 @2011-12-01
- release
* v20111201-2 @2011-12-05
- bugfix: Fix a stupid logic error in bench.php
- bugfix: Symfony2, Change running mode from 'dev' to 'prod'
* v20111201-3 @2012-02-29
- New: new frameworks added: fuelphp, colaphp
* v20111201-4 @2012-05-18
- Optimized configuration for symfony2 (Commit By https://github.com/Smart-Core)
Patch https://github.com/eryx/php-framework-benchmark/pull/2
--EOF--
http://www.laruence.com/2011/12/02/2333.html/comment-page-1#comment-168419
Case
Test Simple "Hello World" page output, Simple MVC logic(Router -> Controller -> Viewer), No Database Connections, No complex logic.
Hardware platform
CPU: Intel Core i5 750 (2.67GHz x4)
RAM: 4GB
Software Environment
Debian 6.0.4 x86_64 (2.6.32-41)
apache 2.2.16 (mpm-prefork,mod-php5)
php 5.3.10
php-apc 3.1.9 (Optimization for include/require)
Copy all projects to /dev/shm/* (Optimization for files read/write)
Frameworks list
* zf: Zend Framework
Site: http://framework.zend.com
Ver: 1.11.11
* zf2: Zend Framework
Site: http://framework.zend.com
Site: https://github.com/zendframework/ZendSkeletonApplication
Ver: 2.0.0-beta1
* symfony: symfony
Site: http://www.symfony-project.org
Ver: 2.0.0
* cakephp: CakePHP
Site: http://cakephp.org
Ver: 2.0.4
* ci: CodeIgniter
Site: http://codeigniter.com
Ver: 2.1.0
* yii: Yii Framework
Site: http://www.yiiframework.com
Ver: 1.1.8
* micromvc4: MicroMVC
Site: http://www.micromvc.com
Ver: 4.0.0
* laravel: Laravel, A PHP Framework For Web Artisans
Site: http://laravel.com
Ver: 2.0.2
* slim: Slim Framework
Site: http://www.slimframework.com
Ver: 1.5.0
* yaf: Yet Another Framework in PHP Extension
Site: http://code.google.com/p/yafphp
Ver: 2.1.3-beta (yaf.cache_config=1)
* FuelPHP: Simple, Flexible, Community driven Web Framework
Site: http://fuelphp.com/
Ver: 1.1
* ColaPHP:
Site: http://code.google.com/p/colaphp/
Ver: 1.2-ga
# XHProf: A Hierarchical Profiler for PHP
Site: http://pecl.php.net/xhprof
Ver: 0.9.2
# The source code of this testing:
Source: https://github.com/eryx/php-framework-benchmark
1. Apache Benchmark
Requests pre second (-c 100 -n 30000), the bigger is better
Requests pre second (-c 200 -n 50000), the bigger is better
2. System LoadAvg
System LoadAvg in 1 Minute when Apache Benchmark Complete,
the smaller is better (-c 100 -n 30000)
3. Memory usage
How many memory usage in one "hello world" page. the smaller is better.
4. Response time
The time of page request to response.
5. Number of function calls (Facebook XHProf)
The number of functions calls in one "hello world" page.
The detail of function calls map
Symfony2 | Zend Framework 1.11.1 | ||
Zend Framework 2.0.0-beta1 | CakePHP 2.0.4 | ||
CodeIgniter 2.1.0 | Yii Framework 1.1.8 | ||
Slim 1.5 | Laravel 2.0.2 | ||
MicroMVC 4.0.0 | Yaf 2.1.3-beta | ||
FuelPHP 1.1 | ColaPHP 1.2 |
The number of files included or required in one "hello world" page. the smaller is better.
Changelog:
* v20111201 @2011-12-01
- release
* v20111201-2 @2011-12-05
- bugfix: Fix a stupid logic error in bench.php
- bugfix: Symfony2, Change running mode from 'dev' to 'prod'
* v20111201-3 @2012-02-29
- New: new frameworks added: fuelphp, colaphp
* v20111201-4 @2012-05-18
- Optimized configuration for symfony2 (Commit By https://github.com/Smart-Core)
Patch https://github.com/eryx/php-framework-benchmark/pull/2
--EOF--
相关文章推荐
- Yaf 2.1性能测试(Yaf 2.1 Benchmark)
- Yaf 2.1性能测试(Yaf 2.1 Benchmark)
- 利用[Pear]Benchmark来辅助性能测试
- web性能测试:apache benchmark(ab)
- Redis性能测试——redis-benchmark使用教程
- 2.1 性能测试的分类
- 轻量级性能测试工具之Apache Benchmark
- redis-benchmark 测试redis性能
- Redis性能测试工具benchmark简介
- web性能测试:Apache Benchmark使用(一)
- 服务器性能测试(benchmark)工具介绍
- [原创]Redis-benchmark 性能测试工具介绍
- Benchmark 性能测试简介
- Kafka设计解析(五)- Kafka性能测试方法及Benchmark报告
- High Performance MySQL作者对TokyoTyrant做的性能测试(benchmark)
- 通用型C/C++程序性能测试Benchmark的简单实现
- yii、yaf、ci等php框架性能对比
- Hadoop的benchmark测试IO性能测试TestDFSIO测试时java.io.FileNotFoundException: TestDFSIO_results.log (Permission
- Redis-benchmark测试Redis性能
- Phalcon2.0.x 和 Laravel5 PHP框架性能测试