-
Notifications
You must be signed in to change notification settings - Fork 160
Multiple stacks #35
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Multiple stacks #35
Changes from 25 commits
88ce5eb
f069974
93028ee
a988715
8d10688
72fece1
be9c180
df036ff
79c2e76
10178e5
0b93772
8316f27
51c2493
9907bbf
eb5ecbf
4a64560
b3b63ff
57dcaa7
4c5bb54
7afc5c0
c74eeb8
8083565
599856d
5517da4
5611c2b
8f75cbc
54f5768
9720d47
d8abdcf
c342017
0ddaf5a
19d8bd7
b4d0e02
0f210a6
c41f14c
22a0569
84842c3
e720dd1
e171242
4e137a5
9861949
d9af4ae
1ebe534
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,2 @@ | ||
/nbproject/ | ||
/output/ | ||
vendor/ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# PHP ORM Benchmark | ||
|
||
## Other Results | ||
|
||
### [motin](https://github.com/motin) | ||
|
||
(2015-12-09) | ||
|
||
Using [the supplied Docker Stack]((docker/README.md)): | ||
|
||
* Ubuntu 15.04 64bit (Docker) | ||
* Nginx 1.7.12 | ||
* PHP-FPM 5.6.4 | ||
* Zend OPcache 7.0.4-dev | ||
* PhalconPHP 2.0.9 | ||
* PHP-FPM 7.0.0 | ||
* Zend OPcache 7.0.6-dev | ||
* PhalconPHP 2.0.9 | ||
* HHVM 3.10.1 | ||
|
||
Running on a MacBook Pro (Retina, 15-inch, Mid 2014). | ||
|
||
By sharing underlying software stacks, the benchmark results vary only according to the host machine's hardware specs and differing code implementations. | ||
|
||
 | ||
|
||
## PHP-FPM 5.6.4 with opcode cache | ||
|
||
## HHVM CLI 3.10.1 (Corresponding roughly to an up-to-date PHP 5.6) | ||
|
||
## PHP CLI 7.0.0 with opcode cache | ||
|
||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
); | ||
$kernel(); | ||
|
||
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; | ||
require getenv('php_framework_benchmark_path').'/libs/output_data.php'; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do you still need the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not impossible, it just gets more locked-in to having to use the same sub-directory in every environment. I'll revert it. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
* | ||
!.gitignore |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/usr/bin/env bash | ||
|
||
DIR=`dirname $0`; | ||
|
||
echo "PHP 5.6.4 Stack:"; | ||
echo "http://"$(docker-machine ip default)":"$(docker-compose -f $DIR/../docker/docker-compose.yml port nginx_php_5_6_4 80 | sed 's/[0-9.]*://') | ||
echo "HHVM 3.10.1 Stack:"; | ||
echo "http://"$(docker-machine ip default)":"$(docker-compose -f $DIR/../docker/docker-compose.yml port nginx_hhvm_3_10_1 80 | sed 's/[0-9.]*://') | ||
echo "PHP 7.0.0 Stack:"; | ||
echo "http://"$(docker-machine ip default)":"$(docker-compose -f $DIR/../docker/docker-compose.yml port nginx_php_7_0_0 80 | sed 's/[0-9.]*://') | ||
|
||
exit 0 |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
## Benchmarking using the supplied Docker Stack | ||
|
||
Use the supplied Docker Stack in order to automatically set up the following benchmarking environments: | ||
|
||
* Ubuntu 15.04 64bit (Docker) | ||
* Nginx 1.7.12 | ||
* PHP-FPM 5.6.4 | ||
* Zend OPcache 7.0.4-dev | ||
* PhalconPHP 2.0.9 | ||
* PHP-FPM 7.0.0 | ||
* Zend OPcache 7.0.6-dev | ||
* PhalconPHP 2.0.9 | ||
* HHVM 3.10.1 | ||
|
||
By sharing underlying software stacks, the benchmark results vary only according to the host machine's hardware specs and differing code implementations. | ||
|
||
### Getting Started | ||
|
||
If running locally, install [Docker Toolbox](https://www.docker.com/docker-toolbox). | ||
|
||
Clone the source code: | ||
~~~ | ||
$ git clone https://github.com/kenjis/php-framework-benchmark.git | ||
$ cd php-framework-benchmark | ||
~~~ | ||
|
||
Cd into the docker directory of this repo and make sure that docker toolbox is available: | ||
~~~ | ||
$ cd docker | ||
$ eval "$(docker-machine env default)" | ||
~~~ | ||
|
||
Start the Nginx/PHP server stacks: | ||
~~~ | ||
$ docker-compose up -d | ||
~~~ | ||
|
||
Start the supplied docker shell from within this repository's `docker` folder: | ||
~~~ | ||
$ docker-compose run shell | ||
~~~ | ||
|
||
Run the set-up script: | ||
~~~ | ||
# sh setup.sh | ||
~~~ | ||
|
||
Run benchmarks against each stack: | ||
~~~ | ||
$ stack=docker_nginx_php_5_6_4 sh benchmark.sh | ||
$ stack=docker_nginx_hhvm_3_10_1 sh benchmark.sh | ||
$ stack=docker_nginx_php_7_0_0 sh benchmark.sh | ||
~~~ | ||
|
||
### Check the results | ||
|
||
To see the results graph, run the following script from outside the docker shell, from the repository root: | ||
|
||
~~~ | ||
$ bin/docker-urls.sh | ||
~~~ | ||
|
||
It echoes URLs, which you should open up in your browser. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove this. I don't need it. I don't maintain the results of Docker.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not primarily for you :) It is for everyone that easily wants to run their own benchmarks. Instead of having to set-up several server environments, compile php extensions and configure their own server software to run all the different framework, they can instead simply install docker toolbox and be running within minutes.
I will remove the change from this PR in hope that you will consider this approach in the future: #41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark results in Docker do not matter unless you or someone deploy using it.
Is your production environment Docker on Mac OS X? If not, the benchmark results might mislead you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My production environment is Docker in AWS instances and it is trivial to run the benchmarks as well when dealing with Docker stacks. Let's discuss in #41