Closed seyfer closed 7 years ago
@axot, I will try to reproduce the error and resolve it.
@kenjis @axot please check it now
@seyfer almost work!
$ bash setup.sh zf-1.12/
***** zf-1.12 *****
Loading composer repositories with package information
Installing dependencies from lock file
- Installing zendframework/zendframework1 (1.12.20)
Downloading: 100%
Generating optimized autoload files
rm: cannot remove ‘./zf-1.12/helloworld/public/.htaccess’: Permission denied
Is this a permission issue?
$ bash benchmark.sh zf-1.12/ zf-2.4/ zf-2.5 laravel-5.2
zf-1.12
ab -c 10 -t 3 http://127.0.0.1/php-framework-benchmark/zf-1.12/public/
Completed 5000 requests
Finished 6047 requests
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 12 100 12 0 0 4852 0 --:--:-- --:--:-- --:--:-- 6000
zf-2.4
ab -c 10 -t 3 http://127.0.0.1/php-framework-benchmark/zf-2.4/public/index.php/application/hello/index
Finished 1903 requests
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 34 100 34 0 0 4575 0 --:--:-- --:--:-- --:--:-- 4857
zf-2.5
ab -c 10 -t 3 http://127.0.0.1/php-framework-benchmark/zf-2.5/public/index.php/application/hello/index
Finished 1882 requests
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 34 100 34 0 0 2822 0 --:--:-- --:--:-- --:--:-- 3090
laravel-5.2
ab -c 10 -t 3 http://127.0.0.1/php-framework-benchmark/laravel-5.2/public/index.php/hello/index
Finished 2532 requests
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33 100 33 0 0 6353 0 --:--:-- --:--:-- --:--:-- 6600
|framework |requests per second|relative|peak memory|relative|
|-------------------|------------------:|-------:|----------:|-------:|
|zf-1.12 | 2,015.64| 3.2| 0.00| 0.0|
|zf-2.4 | 634.23| 1.0| 2.51| 0.0|
|zf-2.5 | 627.22| 1.0| 2.64| 0.0|
|laravel-5.2 | 843.98| 1.3| 2.38| 0.0|
Peak memory shows zero. Does this result correct?
It seems there is no Hello controller.
And you must add the below line in the end of index.php
:
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php';
@kenjis After add out_data.php it works now. Thank you.
|framework |requests per second|relative|peak memory|relative|
|-------------------|------------------:|-------:|----------:|-------:|
|zf-1.12 | 1,972.90| 3.1| 1.27| 4.3|
|zf-2.4 | 638.95| 1.0| 2.51| 8.6|
|zf-2.5 | 630.90| 1.0| 2.64| 9.0|
|kumbia-1.0-dev | 8,463.88| 13.4| 0.29| 1.0|
|tipsy-0.10 | 6,199.86| 9.8| 0.33| 1.1|
|symfony-2.7 | 1,060.05| 1.7| 2.85| 9.7|
|symfony-3.0 | 790.74| 1.3| 3.14| 10.7|
http://127.0.0.1/php-framework-benchmark/zf-1.12/public/
is not good URL.
All other frameworks specify the Hello controller.
Please change the URL like http://127.0.0.1/php-framework-benchmark/zf-1.12/public/index.php/application/hello/index
http://127.0.0.1/php-framework-benchmark/zf-1.12/public/index.php/application/hello/index
I don't know how to do it. Passing parameters through index.php
doesn't work for me with zf-3 and with zf-1 too. Even with right routing config.
But it worked when project was separated in own vhost.
@kenjis, Why I can't output Hello World!
in default index controller?
I did it and @axot even got results.
I did the same for zf-3.
@kenjis please show your nginx default vhost config. maybe it's something wrong with mine. i will try to fix it with right config then
Now I have
404 Not Found nginx/1.10.0 (Ubuntu)
if I add something like index.php/application/hello/index
@seyfer I use Apache.
@seyfer @axot
I fixed a bit this PR and merged into master branch.
framework | requests per second | relative | peak memory | relative |
---|---|---|---|---|
zf-1.12 | 284.31 | 4.7 | 1.27 | 1.0 |
zf-2.5 | 61.13 | 1.0 | 2.96 | 2.3 |
zf-3.0 | 163.44 | 2.7 | 1.93 | 1.5 |
laravel-5.2 | 115.80 | 1.9 | 2.40 | 1.9 |
@seyfer @axot If there is something wrong with zf1 in master branch, feel free to send another PR.
@kenjis , thank you.
@seyfer how to solve this?