Skip to content

Commit 4c25dc8

Browse files
committed
Create REST API benchmark
1 parent 78af1b4 commit 4c25dc8

21 files changed

+2998
-137
lines changed

.env

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

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
.idea/
2+
composer.lock
3+
!var/cache/.gitkeep
4+
!var/log/.gitkeep
25

36
###> symfony/framework-bundle ###
47
/.env.local

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 & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,37 +4,15 @@
44
use App\Kernel;
55
use Symfony\Bundle\FrameworkBundle\Console\Application;
66
use Symfony\Component\Console\Input\ArgvInput;
7-
use Symfony\Component\Debug\Debug;
87

98
set_time_limit(0);
109

1110
require dirname(__DIR__).'/vendor/autoload.php';
1211

13-
if (!class_exists(Application::class)) {
14-
throw new RuntimeException('You need to add "symfony/framework-bundle" as a Composer dependency.');
15-
}
16-
1712
$input = new ArgvInput();
18-
if (null !== $_ENV['APP_ENV'] = $input->getParameterOption(['--env', '-e'], null, true)) {
19-
putenv('APP_ENV='.$_ENV['APP_ENV']);
20-
// force loading .env files when --env is defined
21-
$_SERVER['APP_ENV'] = null;
22-
}
23-
24-
if ($input->hasParameterOption('--no-debug', true)) {
25-
putenv('APP_DEBUG='.$_SERVER['APP_DEBUG'] = $_ENV['APP_DEBUG'] = '0');
26-
}
2713

2814
require dirname(__DIR__).'/src/.bootstrap.php';
2915

30-
if ($_SERVER['APP_DEBUG']) {
31-
umask(0000);
32-
33-
if (class_exists(Debug::class)) {
34-
Debug::enable();
35-
}
36-
}
37-
38-
$kernel = new Kernel($_SERVER['APP_ENV'], $_SERVER['APP_DEBUG']);
16+
$kernel = new Kernel('prod', false);
3917
$application = new Application($kernel);
4018
$application->run($input);

composer.json

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{
2-
"type": "project",
2+
"name": "phpbenchmarks/symfony",
33
"license": "proprietary",
4+
"type": "project",
45
"minimum-stability": "dev",
56
"require": {
67
"php": "^7.1.3",
@@ -9,10 +10,10 @@
910
"symfony/console": "4.2.*",
1011
"symfony/flex": "^1.1",
1112
"symfony/framework-bundle": "4.2.*",
12-
"symfony/yaml": "4.2.*"
13-
},
14-
"require-dev": {
15-
"symfony/dotenv": "4.2.*"
13+
"symfony/yaml": "4.2.*",
14+
"symfony/translation": "4.2.*",
15+
"symfony/serializer-pack": "^1.0",
16+
"phpbenchmarks/symfony-common": "4.3.1"
1617
},
1718
"config": {
1819
"preferred-install": {
@@ -25,11 +26,6 @@
2526
"App\\": "src/"
2627
}
2728
},
28-
"autoload-dev": {
29-
"psr-4": {
30-
"App\\Tests\\": "tests/"
31-
}
32-
},
3329
"replace": {
3430
"paragonie/random_compat": "2.*",
3531
"symfony/polyfill-ctype": "*",

0 commit comments

Comments
 (0)