-
Notifications
You must be signed in to change notification settings - Fork 161
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
Multiple stacks #35
base: master
Are you sure you want to change the base?
Multiple stacks #35
Changes from 10 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 |
---|---|---|
|
@@ -16,4 +16,4 @@ | |
); | ||
$kernel(); | ||
|
||
require $_SERVER['DOCUMENT_ROOT'].'/php-framework-benchmark/libs/output_data.php'; | ||
echo require dirname(__FILE__).'/../../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. Why do you need to I hope the code exactly the same for all frameworks. |
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 |
---|---|---|
|
@@ -8,7 +8,7 @@ class HelloController extends AppController | |
|
||
public function index() | ||
{ | ||
$this->response->body('Hello World!'); | ||
$this->response->body('Hello World!' . require dirname(__FILE__).'/../../../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. I can't accept this change. It exclude shutdown process of the framework. |
||
return $this->response; | ||
} | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
# Shell to run benchmarks within | ||
shell: | ||
build: ./stack/php/shell | ||
links: | ||
- nginx_php_5_6_4 | ||
- nginx_hhvm_3_10_1 | ||
- nginx_php_7_0_0 | ||
volumes: | ||
- ..:/repo:rw | ||
working_dir: '/repo' | ||
command: "/bin/bash" | ||
|
||
# PHP 5.6.4 | ||
php_5_6_4: | ||
image: neam/php-benchmark:ubuntu-15.04-fpm-5.6.4-hhvm-3.10.1-phalcon-2.0.9 | ||
volumes: | ||
- ..:/public:rw | ||
- ./stack/php/:/stack/php:rw | ||
ports: | ||
- "9000" | ||
environment: | ||
stack: 'docker_nginx_php_5_6_4' | ||
working_dir: '/repo' | ||
command: "/stack/php/run-php-fpm.sh" | ||
|
||
# HHVM 3.10.1 | ||
hhvm_3_10_1: | ||
image: neam/php-benchmark:ubuntu-15.04-fpm-5.6.4-hhvm-3.10.1-phalcon-2.0.9 | ||
volumes: | ||
- ..:/public:rw | ||
- ./stack/php/:/stack/php:rw | ||
ports: | ||
- "9000" | ||
environment: | ||
stack: 'docker_nginx_hhvm_3_10_1' | ||
working_dir: '/repo' | ||
command: "/stack/php/run-hhvm.sh" | ||
|
||
# PHP 7.0.0 | ||
php_7_0_0: | ||
image: neam/php-benchmark:ubuntu-15.04-fpm-7.0.0-hhvm-3.10.1-phalcon-2.0.9 | ||
volumes: | ||
- ..:/public:rw | ||
- ./stack/php/:/stack/php:rw | ||
ports: | ||
- "9000" | ||
environment: | ||
stack: 'docker_nginx_php_7_0_0' | ||
working_dir: '/repo' | ||
command: "/stack/php/run-php-fpm-7.sh" | ||
|
||
# Nginx configured to serve PHP 5.6.4 | ||
nginx_php_5_6_4: | ||
image: nginx:1.7 | ||
links: | ||
- php_5_6_4:php | ||
volumes: | ||
- ..:/public:rw | ||
- ./stack/nginx/:/stack/nginx:rw | ||
ports: | ||
- "80" | ||
working_dir: '/app' | ||
command: "/stack/nginx/run.sh" | ||
|
||
# Nginx configured to serve HHVM 3.10.1 | ||
nginx_hhvm_3_10_1: | ||
image: nginx:1.7 | ||
links: | ||
- hhvm_3_10_1:php | ||
volumes: | ||
- ..:/public:rw | ||
- ./stack/nginx/:/stack/nginx:rw | ||
ports: | ||
- "80" | ||
working_dir: '/app' | ||
command: "/stack/nginx/run.sh" | ||
|
||
# Nginx configured to serve PHP 7.0.0 | ||
nginx_php_7_0_0: | ||
image: nginx:1.7 | ||
links: | ||
- php_7_0_0:php | ||
volumes: | ||
- ..:/public:rw | ||
- ./stack/nginx/:/stack/nginx:rw | ||
ports: | ||
- "80" | ||
working_dir: '/app' | ||
command: "/stack/nginx/run.sh" |
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