-
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
Conversation
…ents and easily benchmark against php 5.6, hhvm and php 7
@@ -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 comment
The 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.
The docker stacks are not served in the sub-directory php-framework-benchmark (since it does not make sense to do so when running fully dedicated stacks for the benchmarks), thus relying on the document root + a sub-directory is not working in both cases. Dirname +
Many frameworks required the response to be returned in the actual controller method and not echoed after the framework has been shutdown. To be able to return the value without using output buffering, I changed the printf to sprintf. This also makes it ready to benchmark event-driven frameworks such as http://reactphp.org/ I traced this back to #38 |
…sues as described in kenjis#38)
3ae0eea
to
4a64560
Compare
…share the same colors per framework)
The docker stacks should have the same sub-directory. So you don't have to change the code only for the docker stacks. |
list.php
Outdated
'phalcon-1.3', // Not compiled for PHP7 - is it even supported? | ||
'phalcon-2.0', // Not compiled for PHP7 - is it even supported? | ||
'ice-1.0', // Not compiled for PHP7 - is it even supported? | ||
'bear-1.0', // apc_fetch()-error on PHP7 |
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.
BEAR.Sunday should work fine on php7.
Fixed and reversed the changed code. |
Btw, interesting results already especially regarding HHVM: facebook/hhvm#6645 |
README.md
Outdated
By sharing underlying software stacks, the benchmark results vary only according to the host machine's hardware specs and differing code implementations. | ||
|
||
See [docker/README.md](docker/README.md) | ||
|
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
Why don't you move |
|
Sure, now when there are three scripts it makes more sense. When there was only a single script, it felt odd to create a new bin-folder instead of re-using the existing one. |
Weird, it is installed at https://github.com/motin/php-framework-benchmark/blob/e720dd142933fed0ffe3247bce6874fa5d900668/docker/stack/php/shell/Dockerfile#L3 I'll add |
You're right. I don't know why. I did according to your README. |
Fixes #33 and includes fix for #34
Simplifies the fix for #8
Update: This PR also includes more robust results parsing, a php-based framework list, as well as fixes for #36 and #38 - all required to properly support multiple stacks.