Skip to content

Commit df696d5

Browse files
steevanbphpbenchmarks
authored andcommitted
Hello world benchmark for Symfony 5.0.0.
1 parent 8c5b7e2 commit df696d5

File tree

13 files changed

+3790
-13
lines changed

13 files changed

+3790
-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

.phpbenchmarks/Configuration.php

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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 >= 2;
27+
}
28+
29+
public static function getBenchmarkUrl(): string
30+
{
31+
return '/benchmark/helloworld';
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 5;
42+
}
43+
44+
public static function getCoreDependencyMinorVersion(): int
45+
{
46+
return 0;
47+
}
48+
49+
public static function getCoreDependencyPatchVersion(): int
50+
{
51+
return 0;
52+
}
53+
54+
public static function getBenchmarkType(): int
55+
{
56+
return 1;
57+
}
58+
59+
public static function getSourceCodeUrls(): array
60+
{
61+
return [
62+
'route' => 'https://github.com/phpbenchmarks/symfony/tree/5.0.0.1/config/routes.yaml',
63+
'controller' => 'https://github.com/phpbenchmarks/symfony/tree/5.0.0.1/src/Controller/HelloWorldController.php'
64+
];
65+
}
66+
}

0 commit comments

Comments
 (0)