Skip to content

Commit 5ae124b

Browse files
committed
Update README.md & screenshots
1 parent 6457e7f commit 5ae124b

File tree

5 files changed

+56
-61
lines changed

5 files changed

+56
-61
lines changed

README.md

Lines changed: 56 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,61 @@ Components like Template engines or ORM/Database libraries are out of scope in t
1313

1414

1515
- [PHP Frameworks Bench](#php-frameworks-bench)
16+
- [Benchmarks](#benchmarks)
17+
- [Latest](#latest)
1618
- [Benchmarking Policy](#benchmarking-policy)
1719
- [How to Benchmark](#how-to-benchmark)
1820
- [Commands](#commands)
19-
- [Benchmarks](#benchmarks)
20-
- [Latest](#latest)
21-
- [OPCache](#results-with-opcache)
2221
- [References](#references)
2322
- [License](#license)
2423

2524

25+
## Benchmarks
26+
27+
### Latest
28+
29+
#### Environment
30+
31+
* Ubuntu 22.04 LTS 64bit
32+
* PHP 8.1.6
33+
* OPCache enabled
34+
* Apache 2.4.52
35+
* CPU Core i7 2600K@4Ghz
36+
* Memory 16G
37+
38+
39+
#### Results (2022/5/22)
40+
41+
These are my benchmarks, not yours. **I encourage you to run on your (production equivalent) environments.**
42+
43+
![Benchmark Results Graph Throughput](screenshots/php-frameworks-bench-throughput.png)
44+
![Benchmark Results Graph Memory](screenshots/php-frameworks-bench-memory.png)
45+
![Benchmark Results Graph Execution Time](screenshots/php-frameworks-bench-exectime.png)
46+
![Benchmark Results Graph Included Files](screenshots/php-frameworks-bench-includedfiles.png)
47+
48+
|framework |requests per second|relative|peak memory|relative|
49+
|-------------------|------------------:|-------:|----------:|-------:|
50+
|pure-php | 42,114.24| 52.1| 0.34| 1.0|
51+
|phroute-2.2 | 33,424.47| 42.4| 0.34| 1.0|
52+
|fastroute-1.3 | 33,190.14| 42.1| 0.34| 1.0|
53+
|siler-1.7.9 | 22,152.74| 28.8| 0.36| 1.1|
54+
|leaf-3.0 | 20,685.10| 26.3| 0.36| 1.1|
55+
|fatfree-3.8.0 | 19,282.52| 24.5| 0.39| 1.1|
56+
|frameworkx-dev | 18,033.22| 22.9| 0.37| 1.1|
57+
|slim-4.10 | 14,958.27| 19.0| 0.38| 1.1|
58+
|slim-3.12 | 14,714.84| 18.7| 0.39| 1.1|
59+
|yii-2.0-basic | 11,831.91| 15.0| 0.70| 2.1|
60+
|ubiquity-2.4.x.dev | 11,669.47| 14.8| 0.38| 1.1|
61+
|silex-2.3 | 10,415.74| 13.2| 0.39| 1.1|
62+
|symfony-5.4 | 9,761.44| 12.4| 0.46| 1.4|
63+
|symfony-6.0 | 9,737.48| 12.4| 0.45| 1.3|
64+
|lumen-9.0 | 6,205.79| 7.7| 0.39| 1.1|
65+
|cakephp-4.3 | 5,562.91| 7.0| 0.43| 1.3|
66+
|laminas-2.0.x.dev | 5,015.71| 6.4| 0.49| 1.4|
67+
|fuelphp-1.9 | 4,894.22| 6.2| 0.45| 1.3|
68+
|codeigniter-4.1 | 1,938.43| 2.5| 1.46| 4.3|
69+
|laravel-9.1 | 788.76| 1.0| 0.55| 1.6|
70+
2671

2772
## Benchmarking Policy
2873

@@ -47,24 +92,26 @@ If you want to benchmark PHP extension frameworks like Phalcon, you need to inst
4792

4893
1- Download & install the library in your localhost:
4994

50-
```
51-
# instead you can use --branch vx.x
95+
```bash
96+
# you can put --branch vx.x
5297
$ git clone https://github.com/myaghobi/php-frameworks-bench.git
98+
5399
$ cd php-frameworks-bench
100+
54101
# run the setup & follow the progress
55102
$ bash setup.sh
56103
```
57104

58105
2- To make sure everything is ok:
59106

60-
```
107+
```bash
61108
# this is optional
62109
$ bash check.sh
63110
```
64111

65112
3- Run benchmarks:
66113

67-
```
114+
```bash
68115
$ bash benchmark.sh
69116
```
70117

@@ -75,7 +122,7 @@ $ bash benchmark.sh
75122

76123
## Commands
77124

78-
```
125+
```bash
79126
# composer update for each framework
80127
$ bash update.sh
81128

@@ -93,64 +140,12 @@ $ bash show-table.sh
93140

94141
To specify the frameworks, put them after each command:
95142

96-
```
143+
```bash
97144
$ bash benchmark.sh laravel-9.1/ slim-4.10/ fatfree-3.8.0/
98145
...
99146
```
100147

101148

102-
## Benchmarks
103-
104-
### Latest
105-
106-
#### Environment
107-
108-
* Ubuntu 22.04 LTS 64bit
109-
* PHP 8.1.5
110-
* OPCache disabled
111-
* Apache 2.4.52
112-
* CPU Core i7 2600K@4Ghz
113-
* Memory 16G
114-
115-
116-
#### Results (2022/5/15)
117-
118-
These are my benchmarks, not yours. **I encourage you to run on your (production equivalent) environments.**
119-
120-
![Benchmark Results Graph Throughput](screenshots/php-frameworks-bench-throughput.png)
121-
![Benchmark Results Graph Memory](screenshots/php-frameworks-bench-memory.png)
122-
![Benchmark Results Graph Execution Time](screenshots/php-frameworks-bench-exectime.png)
123-
![Benchmark Results Graph Included Files](screenshots/php-frameworks-bench-includedfiles.png)
124-
125-
|framework |requests per second|relative|peak memory|relative|
126-
|-------------------|------------------:|-------:|----------:|-------:|
127-
|pure-php | 22,427.34|22,427.3| 0.42| 0.4|
128-
|fastroute-1.3 | 4,224.76| 4,224.8| 0.56| 0.6|
129-
|phroute-2.2 | 3,901.59| 3,901.6| 0.58| 0.6|
130-
|leaf-3.0 | 1,539.38| 1,539.4| 1.05| 1.1|
131-
|fatfree-3.8.0 | 1,414.71| 1,414.7| 1.67| 1.7|
132-
|siler-1.7.9 | 1,314.15| 1,314.2| 1.17| 1.2|
133-
|frameworkx-dev | 972.97| 973.0| 1.41| 1.4|
134-
|slim-3.12 | 969.54| 969.5| 1.40| 1.4|
135-
|slim-4.10 | 752.96| 753.0| 1.60| 1.6|
136-
|yii-2.0-basic | 510.90| 510.9| 2.72| 2.7|
137-
|silex-2.3 | 510.51| 510.5| 2.18| 2.2|
138-
|fuelphp-1.9 | 410.60| 410.6| 2.50| 2.5|
139-
|ubiquity-2.4.x.dev | 379.51| 379.5| 2.33| 2.3|
140-
|lumen-9.0 | 329.70| 329.7| 3.39| 3.4|
141-
|symfony-6.0 | 293.11| 293.1| 3.85| 3.9|
142-
|symfony-5.4 | 291.41| 291.4| 3.77| 3.8|
143-
|codeigniter-4.1 | 290.94| 290.9| 3.39| 3.4|
144-
|laminas-2.0.x.dev | 284.43| 284.4| 3.52| 3.5|
145-
|cakephp-4.3 | 232.68| 232.7| 4.45| 4.5|
146-
|laravel-9.1 | 93.47| 93.5| 11.04| 11.0|
147-
148-
149-
150-
### Results with OPCache (old version)
151-
[![IMAGE ALT TEXT](http://img.youtube.com/vi/BUcxalvD92U/0.jpg)](http://www.youtube.com/watch?v=BUcxalvD92U "PHP OPCache Benchmarks, a Comparison for Popular Frameworks")
152-
153-
154149
## References
155150
Note: This project is based on
156151
[php-framework-benchmark](https://github.com/kenjis/php-framework-benchmark). It was very old and abandoned, so I decided to split it from the origin and update it separately.
1.62 KB
Loading
2.89 KB
Loading
4.2 KB
Loading
4 KB
Loading

0 commit comments

Comments
 (0)