# rest-bench **Repository Path**: maxspeed40k/rest-bench ## Basic Information - **Project Name**: rest-bench - **Description**: 比较各种restful语言/框架 - **Primary Language**: PHP - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 3 - **Forks**: 1 - **Created**: 2014-07-26 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## 运行结果 ab -t5 -c100 url * golang-martini & gorm 10800 * pure-php & hhvm 5000 * pure-php & php-fpm & nginx 4000 * yii2-db & hhvm 3000 * yii & hhvm 2600 * yii2-db & php-fpm 2100 * tornado & SQLAlchemy 1800 * doctrine-dbal & hhvm 1700 * doctrine-dbal & php-fpm 1300 * flask & SQLAlchemy & gunicorn 1200 * yii & php-fpm 1100 * yii2 & php-fpm 500 * web.py & SQLAlchemy 400 * yii2 & hhvm fail ## 测试sql CREATE TABLE IF NOT EXISTS `user` ( `id` bigint(20) NOT NULL AUTO_INCREMENT, `username` varchar(40) NOT NULL, `password` varchar(40) NOT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ; insert into `user` values(1,'user1',md5('password1')),(2,'user2',md5('password2')),(3,'user3',md5('password3')); ## martini-gorm go get github.com/go-martini/martini go get github.com/jinzhu/gorm go get github.com/go-sql-driver/mysql ## flask pip install flask mysql-python SQLAlchemy Flask-SQLAlchemy ## tornado pip install tornado mysql-python SQLAlchemy ## pure-php nothing to configure ## nginx worker_processes 4; ## fpm-fpm pm.max_children = 150 pm.start_servers = 15 pm.min_spare_servers = 5 pm.max_spare_servers = 35