Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kenjis/php-orm-benchmark
PHP ORM Benchmark
https://github.com/kenjis/php-orm-benchmark
benchmark orm php
Last synced: about 2 months ago
JSON representation
PHP ORM Benchmark
- Host: GitHub
- URL: https://github.com/kenjis/php-orm-benchmark
- Owner: kenjis
- License: other
- Created: 2014-12-04T21:09:07.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2015-12-11T01:44:05.000Z (about 9 years ago)
- Last Synced: 2024-10-16T23:02:49.690Z (2 months ago)
- Topics: benchmark, orm, php
- Language: PHP
- Homepage:
- Size: 584 KB
- Stars: 144
- Watchers: 12
- Forks: 15
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE_FUEL.md
Awesome Lists containing this project
README
# PHP ORM Benchmark
## ORMs to Benchmark
1. Doctrine ORM v2.5.2
1. Eloquent ORM (illuminate/database) v4.2.17
1. FuelPHP Orm 1.7.3
1. Phalcon ORM 2.0.8
1. Propel ORM 2.0-dev
1. Yii ActiveRecord 1.1.16
1. Yii ActiveRecord 2.0.6## Results
These are my benchmarks, not yours. **I encourage you to run on your (production equivalent) environments.**
### Benchmarking Environment
* CentOS 6.6 64bit (VM; VirtualBox with Vagrant Synced folder)
* PHP 5.5.30 (Remi RPM)
* Zend OPcache v7.0.4-dev
* MySQL 5.1
* Apache 2.2(2015-12-10)
|orm |time (ms)|memory (KB) |
|-------------------|--------:|-----------:|
|doctrine | 109.81| 1310.06|
|propel2 | 51.32| 1144.60|
|eloquent | 34.46| 673.80|
|yii1 | 17.84| 808.48|
|fuel | 11.74| 389.72|
|yii2 | 9.09| 835.82|
|phalcon | 7.25| 150.05|If you are interested in other resutls, see [OTHER_RESULTS.md](OTHER_RESULTS.md).
## How to Benchmark
(1) Install this repository and install composer packages.
~~~
$ git clone https://github.com/kenjis/php-orm-benchmark.git
$ cd php-orm-benchmark
$ composer install
~~~You may skip Phalcon by running `composer install --ignore-platform-reqs`, if you do not have it installed.
(2) Set `public` folder as your web document root. If you access , you can see the results graph.
(3) Configure `fuel/app/config/development/db.php`.
(4) Create database `php_dev` and import schema `schema/php_dev.sql`.
~~~
$ php oil r setup:mysql
~~~(5) Generate config file for Propel.
~~~
$ php oil r setup:propel2
~~~(6) Run benchmarks.
~~~
$ php oil r benchmark
~~~See .
You can get markdown table for the results.
~~~
$ php oil r show:result_table
~~~## References
* [Doctrine ORM](http://www.doctrine-project.org/projects/orm.html)
* [Eloquent ORM](https://github.com/illuminate/database)
* [FuelPHP 1.x Orm](http://fuelphp.com/docs/packages/orm/intro.html)
* [Phalcon ORM](http://docs.phalconphp.com/en/latest/reference/models.html)
* [Propel 2](http://propelorm.org/)
* [Yii 1 ActiveRecord](http://www.yiiframework.com/doc/guide/1.1/en/database.ar)
* [Yii 2 ActiveRecord](http://www.yiiframework.com/doc-2.0/guide-db-active-record.html)## Other Benchmarks
* [François Zaninotto php-orm-benchmark with updated vendors](https://github.com/Big-Shark/forked-php-orm-benchmark)
* [PHP Framework Benchmark](https://github.com/kenjis/php-framework-benchmark)
* [PHP User Agent Parser Benchmarks](https://github.com/kenjis/user-agent-parser-benchmarks)