Skip to content

Commit e62a36e

Browse files
committed
Compatibility with benchmark kit 4
1 parent e2d942e commit e62a36e

12 files changed

+1126
-677
lines changed

.circleci/config.yml

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

+86
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
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 'CakePHP';
17+
}
18+
19+
public static function getComponentSlug(): string
20+
{
21+
return 'cake-php';
22+
}
23+
24+
public static function isPhp56Compatible(): bool
25+
{
26+
return true;
27+
}
28+
29+
public static function isPhp70Compatible(): bool
30+
{
31+
return true;
32+
}
33+
34+
public static function isPhp71Compatible(): bool
35+
{
36+
return true;
37+
}
38+
39+
public static function isPhp72Compatible(): bool
40+
{
41+
return true;
42+
}
43+
44+
public static function isPhp73Compatible(): bool
45+
{
46+
return true;
47+
}
48+
49+
public static function getBenchmarkUrl(): string
50+
{
51+
return '/benchmark/helloworld';
52+
}
53+
54+
public static function getCoreDependencyName(): string
55+
{
56+
return 'cakephp/cakephp';
57+
}
58+
59+
public static function getCoreDependencyMajorVersion(): int
60+
{
61+
return 3;
62+
}
63+
64+
public static function getCoreDependencyMinorVersion(): int
65+
{
66+
return 7;
67+
}
68+
69+
public static function getCoreDependencyPatchVersion(): int
70+
{
71+
return 0;
72+
}
73+
74+
public static function getBenchmarkType(): int
75+
{
76+
return 1;
77+
}
78+
79+
public static function getSourceCodeUrls(): array
80+
{
81+
return [
82+
'route' => 'https://github.com/phpbenchmarks/cake-php-common/blob/cake-php_3_hello-world/Controller/HelloWorldController.php#L10',
83+
'controller' => 'https://github.com/phpbenchmarks/cake-php-common/blob/cake-php_3_hello-world/Controller/HelloWorldController.php'
84+
];
85+
}
86+
}

0 commit comments

Comments
 (0)