Skip to content

Commit c7e0753

Browse files
committed
Code validated by PHPBenchmarks kit 1.0.3
1 parent f031542 commit c7e0753

11 files changed

+233
-39
lines changed

.phpbenchmarks/codeLink.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
declare -A codeLinks=(
4+
[route]="https://github.com/phpbenchmarks/symfony-common/blob/4.1.1/Resources/config/routing.yml"
5+
[controller]="https://github.com/phpbenchmarks/symfony-common/blob/4.1.1/Controller/HelloWorldController.php"
6+
)

.phpbenchmarks/configuration.sh

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/usr/bin/env bash
2+
3+
readonly PHPBENCHMARKS_PHP_5_6_ENABLED=false
4+
readonly PHPBENCHMARKS_PHP_7_0_ENABLED=false
5+
readonly PHPBENCHMARKS_PHP_7_1_ENABLED=true
6+
readonly PHPBENCHMARKS_PHP_7_2_ENABLED=true
7+
readonly PHPBENCHMARKS_PHP_7_3_ENABLED=true
8+
9+
readonly PHPBENCHMARKS_COMPONENT_NAME="Symfony"
10+
readonly PHPBENCHMARKS_COMPONENT_SLUG="symfony"
11+
12+
readonly PHPBENCHMARKS_BENCHMARK_URL="/benchmark/helloworld"
13+
14+
readonly PHPBENCHMARKS_DEPENDENCY_NAME="symfony/framework-bundle"
15+
16+
readonly PHPBENCHMARKS_DEPENDENCY_MAJOR_VERSION=4
17+
readonly PHPBENCHMARKS_DEPENDENCY_MINOR_VERSION=1
18+
readonly PHPBENCHMARKS_DEPENDENCY_BUGFIX_VERSION=9

.phpbenchmarks/initBenchmark.sh

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/usr/bin/env bash
2+
3+
function clearCacheAndLogs() {
4+
rm -rf var/cache/*
5+
[ "$?" != "0" ] && exit 1
6+
chmod -R 777 var/cache
7+
[ "$?" != "0" ] && exit 1
8+
9+
rm -rf var/log/*
10+
[ "$?" != "0" ] && exit 1
11+
chmod -R 777 var/log
12+
[ "$?" != "0" ] && exit 1
13+
}
14+
15+
function initBenchmark() {
16+
# because of Symfony Flex bug (https://github.com/symfony/symfony/issues/29581), we need to remove vendor
17+
rm -rf vendor/
18+
clearCacheAndLogs
19+
20+
composer install --no-dev --classmap-authoritative
21+
[ "$?" != "0" ] && exit 1
22+
23+
clearCacheAndLogs
24+
php bin/console cache:warmup
25+
26+
return 0
27+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Hello World !

.phpbenchmarks/vhost.conf

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
server {
2+
listen 80;
3+
server_name ____HOST____;
4+
root ____PROJECT_DIR____/public;
5+
location / {
6+
try_files $uri /index.php$is_args$args;
7+
}
8+
location ~ ^/(index).php(/|$) {
9+
fastcgi_pass unix:/run/php/____PHP_FPM_SOCK____;
10+
fastcgi_split_path_info ^(.+.php)(/.*)$;
11+
include fastcgi_params;
12+
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
13+
fastcgi_param HTTPS off;
14+
}
15+
error_log /var/log/nginx/benchmark_error.log;
16+
access_log /var/log/nginx/benchmark_access.log;
17+
}

README.md

+30-11
Original file line numberDiff line numberDiff line change
@@ -4,24 +4,43 @@
44
<a href="http://www.phpbenchmarks.com" target="_blank">www.phpbenchmarks.com</a>
55
</p>
66

7-
## What is www.phpbenchmarks.com ?
7+
## What is www.phpbenchmarks.com?
88

9-
You will find lot of benchmarks for PHP frameworks and template engines.
9+
You will find lot of benchmarks for PHP frameworks and template engines on [phpbenchmarks.com](http://www.phpbenchmarks.com).
1010

11-
You can compare results between Apache Bench and Siege, and PHP 5.6 to 7.3.
11+
Benchmarks results are available for Apache Bench and Siege, and PHP 5.6 to 7.3.
1212

13-
## What is this repository ?
13+
Our benchmarking protocol is available on [benchmarking protocol page](http://www.phpbenchmarks.com/en/documentation/benchmarking-protocol).
1414

15-
It's benchmark common code for Symfony benchmarks.
15+
## What is this repository?
1616

17-
Switch branch to select your Symfony major version and benchmark you want to see.
17+
It contains Symfony installation `only`.
18+
To reuse code between minor versions, features for benchmarks are not coded in this repository
19+
but in [phpbenchmarks/symfony-common](https://github.com/phpbenchmarks/symfony-common) repository.
1820

19-
See all Symfony benchmarked versions on [phpbenchmarks/symfony](https://github.com/phpbenchmarks/symfony).
20-
21-
You can find how we benchmark on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark-protocol.html).
21+
Switch branch to select version and benchmark you want to see.
2222

2323
## Benchmarks
2424

25-
You can find all Symfony benchmarks results on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark/symfony.html).
25+
You can find Symfony 4.1 benchmarks results on
26+
[benchmarks results page](http://www.phpbenchmarks.com/en/benchmark/symfony/4.1).
27+
28+
See all Symfony benchmarked versions on [select version page](http://www.phpbenchmarks.com/en/benchmark/symfony/version).
29+
30+
## Community
31+
32+
Go to [community page](http://www.phpbenchmarks.com/en/community) to see the Hall of fame, or download the benchmark kit to add your code!
33+
34+
## How version works?
35+
36+
We do not follow semantic version for this repository. Here is an explanation about our versioning system:
37+
38+
`W` Benchmarked component (Symfony, Laravel, Twig etc) major version
39+
40+
`X` Benchmarked component minor version
41+
42+
`Y` Benchmarked component bugfix version
43+
44+
`Z` Benchmark type: `1` Hello World, `3` REST API, `4` Templating small overload, `5` Templating big overload
2645

27-
Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark !
46+
Note that all components do not have all benchmark types.

composer.json

+17-19
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
11
{
22
"name": "phpbenchmarks/symfony",
3+
"description": "Symfony benchmark code for PHPBenchmarks.",
34
"license": "proprietary",
45
"type": "project",
56
"require": {
67
"php": "^7.1.3",
78
"ext-iconv": "*",
8-
"symfony/console": "4.1.*",
9+
"symfony/console": "4.1.9",
910
"symfony/flex": "^1.0",
10-
"symfony/framework-bundle": "4.1.*",
11-
"symfony/yaml": "4.1.*",
12-
"phpbenchmarks/symfony-common": "4.1.1"
11+
"symfony/framework-bundle": "4.1.9",
12+
"symfony/yaml": "4.1.9",
13+
"symfony/routing": "4.1.9",
14+
"symfony/http-foundation": "4.1.9",
15+
"symfony/event-dispatcher": "4.1.9",
16+
"symfony/debug": "4.1.9",
17+
"symfony/http-kernel": "4.1.9",
18+
"symfony/finder": "4.1.9",
19+
"symfony/filesystem": "4.1.9",
20+
"symfony/dependency-injection": "4.1.9",
21+
"symfony/config": "4.1.9",
22+
"symfony/cache": "4.1.9",
23+
"phpbenchmarks/symfony-common": "4.1.1",
24+
"phpbenchmarks/benchmark-kit": "~1.0.3"
1325
},
14-
"minimum-stability": "beta",
1526
"config": {
1627
"preferred-install": {
1728
"*": "dist"
@@ -30,20 +41,7 @@
3041
"symfony/polyfill-php56": "*"
3142
},
3243
"conflict": {
33-
"symfony/symfony": "*",
34-
"https://github.com/composer/composer/issues/7827": "0.0.0",
35-
"https://github.com/symfony/symfony/issues/29581": "0.0.0",
36-
"symfony/routing": ">=4.2.0",
37-
"symfony/http-foundation": ">=4.2.0",
38-
"symfony/event-dispatcher": ">=4.2.0",
39-
"symfony/debug": ">=4.2.0",
40-
"symfony/http-kernel": ">=4.2.0",
41-
"symfony/finder": ">=4.2.0",
42-
"symfony/filesystem": ">=4.2.0",
43-
"symfony/dependency-injection": ">=4.2.0",
44-
"symfony/config": ">=4.2.0",
45-
"symfony/var-exporter": ">=4.2.0",
46-
"symfony/cach": ">=4.2.0"
44+
"symfony/symfony": "*"
4745
},
4846
"extra": {
4947
"symfony": {

composer.lock.php7.1

+38-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.lock.php7.2

+38-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

composer.lock.php7.3

+38-3
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

symfony.lock

+3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
{
2+
"phpbenchmarks/benchmark-kit": {
3+
"version": "dev-master"
4+
},
25
"phpbenchmarks/symfony-common": {
36
"version": "4.1.0"
47
},

0 commit comments

Comments
 (0)