Skip to content

Commit ce300e8

Browse files
steevanbphpbenchmarks
authored andcommitted
REST API benchmark for Symfony 4.4.0
1 parent 158b9ac commit ce300e8

26 files changed

+21382
-13
lines changed

.circleci/config.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
version: '2.1'
2+
3+
jobs:
4+
ValidateBenchmark:
5+
docker:
6+
- image: phpbenchmarks/benchmark-kit:4
7+
working_directory: /var/www/benchmark
8+
environment:
9+
NGINX_PORT: 80
10+
steps:
11+
- checkout
12+
- run:
13+
name: /var/entrypoint.sh
14+
command: /var/entrypoint.sh --nginx-as-service
15+
- run:
16+
name: "benchmark:validate"
17+
command: "/var/benchmark-kit/bin/console benchmark:validate"
18+
19+
workflows:
20+
version: '2.1'
21+
BenchmarkKit:
22+
jobs:
23+
- ValidateBenchmark

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
/composer.lock
12

23
###> symfony/framework-bundle ###
34
/.env.local

.phpbenchmarks/Configuration.php

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace PhpBenchmarks\BenchmarkConfiguration;
6+
7+
class Configuration
8+
{
9+
public static function getComponentType(): int
10+
{
11+
return 2;
12+
}
13+
14+
public static function getComponentName(): string
15+
{
16+
return 'Symfony';
17+
}
18+
19+
public static function getComponentSlug(): string
20+
{
21+
return 'symfony';
22+
}
23+
24+
public static function isCompatibleWithPhp(int $major, int $minor): bool
25+
{
26+
return $major === 7 && $minor >= 1;
27+
}
28+
29+
public static function getBenchmarkUrl(): string
30+
{
31+
return '/benchmark/rest';
32+
}
33+
34+
public static function getCoreDependencyName(): string
35+
{
36+
return 'symfony/framework-bundle';
37+
}
38+
39+
public static function getCoreDependencyMajorVersion(): int
40+
{
41+
return 4;
42+
}
43+
44+
public static function getCoreDependencyMinorVersion(): int
45+
{
46+
return 4;
47+
}
48+
49+
public static function getCoreDependencyPatchVersion(): int
50+
{
51+
return 0;
52+
}
53+
54+
public static function getBenchmarkType(): int
55+
{
56+
return 3;
57+
}
58+
59+
public static function getSourceCodeUrls(): array
60+
{
61+
return [
62+
'route' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/config/routes.yaml#L1',
63+
'controller' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/src/Controller/RestApiController.php',
64+
'randomizeLanguageDispatchEvent' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/src/Controller/RestApiController.php#L15',
65+
'randomizeLanguageEventListener' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/src/EventSubscriber/DefineLocaleEventSubscriber.php',
66+
'translations' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/translations/phpbenchmarks.en_GB.yaml',
67+
'translate' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/src/Normalizer/UserNormalizer.php#L48',
68+
'serialize' => 'https://github.com/phpbenchmarks/symfony/tree/4.4.0.3/src/Normalizer/UserNormalizer.php#L42'
69+
];
70+
}
71+
}

0 commit comments

Comments
 (0)