Skip to content

Commit b9ea8f7

Browse files
committed
Create REST Api benchmark
1 parent 8c91829 commit b9ea8f7

File tree

19 files changed

+2991
-173
lines changed

19 files changed

+2991
-173
lines changed

.env.dist

Lines changed: 0 additions & 10 deletions
This file was deleted.

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
.idea/
2+
composer.lock
23

34
###> symfony/framework-bundle ###
45
/.env

README.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
<p align="center">
2+
<img src="http://www.phpbenchmarks.com/images/logo_github.png">
3+
<br>
4+
<a href="http://www.phpbenchmarks.com" target="_blank">www.phpbenchmarks.com</a>
5+
</p>
6+
7+
## What is www.phpbenchmarks.com ?
8+
9+
You will find lot of benchmarks for PHP frameworks and template engines.
10+
11+
You can compare results between Apache Bench and Siege, and PHP 5.6 to 7.2.
12+
13+
## What is this repository ?
14+
15+
It's benchmark common code for Symfony benchmarks.
16+
17+
Switch branch to select your Symfony major version and benchmark you want to see.
18+
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).
22+
23+
## Benchmarks
24+
25+
You can find all Symfony benchmarks results on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark/symfony.html).
26+
27+
Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark !

bin/console

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,6 @@ set_time_limit(0);
1111

1212
require __DIR__.'/../vendor/autoload.php';
1313

14-
if (!class_exists(Application::class)) {
15-
throw new \RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
16-
}
17-
18-
if (!isset($_SERVER['APP_ENV'])) {
19-
if (!class_exists(Dotenv::class)) {
20-
throw new \RuntimeException('APP_ENV environment variable is not defined. You need to define environment variables for configuration or add "symfony/dotenv" as a Composer dependency to load variables from a .env file.');
21-
}
22-
(new Dotenv())->load(__DIR__.'/../.env');
23-
}
24-
25-
$input = new ArgvInput();
26-
$env = $input->getParameterOption(['--env', '-e'], $_SERVER['APP_ENV'] ?? 'dev', true);
27-
$debug = (bool) ($_SERVER['APP_DEBUG'] ?? ('prod' !== $env)) && !$input->hasParameterOption('--no-debug', true);
28-
29-
if ($debug) {
30-
umask(0000);
31-
32-
if (class_exists(Debug::class)) {
33-
Debug::enable();
34-
}
35-
}
36-
37-
$kernel = new Kernel($env, $debug);
14+
$kernel = new Kernel('prod', false);
3815
$application = new Application($kernel);
3916
$application->run($input);

composer.json

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
"require": {
66
"php": "^7.1.3",
77
"ext-iconv": "*",
8+
"phpbenchmarks/symfony-common": "4.3.0",
89
"symfony/console": "4.1.0-BETA2",
910
"symfony/flex": "^1.0",
1011
"symfony/framework-bundle": "4.1.0-BETA2",
1112
"symfony/lts": "^4@dev",
13+
"symfony/serializer-pack": "^1.0",
14+
"symfony/translation": "4.1.0-BETA2",
1215
"symfony/yaml": "4.1.0-BETA2"
1316
},
1417
"minimum-stability": "beta",
15-
"require-dev": {
16-
"symfony/dotenv": "^4.0"
17-
},
1818
"config": {
1919
"preferred-install": {
2020
"*": "dist"
@@ -26,11 +26,6 @@
2626
"App\\": "src/"
2727
}
2828
},
29-
"autoload-dev": {
30-
"psr-4": {
31-
"App\\Tests\\": "tests/"
32-
}
33-
},
3429
"replace": {
3530
"symfony/polyfill-iconv": "*",
3631
"symfony/polyfill-php71": "*",
@@ -39,8 +34,7 @@
3934
},
4035
"scripts": {
4136
"auto-scripts": {
42-
"cache:clear": "symfony-cmd",
43-
"assets:install --symlink --relative %PUBLIC_DIR%": "symfony-cmd"
37+
"cache:clear": "symfony-cmd"
4438
},
4539
"post-install-cmd": [
4640
"@auto-scripts"

0 commit comments

Comments
 (0)