Skip to content

Commit 99efdd6

Browse files
committed
Templating small overload benchmark for PHP 7.4.0
0 parents  commit 99efdd6

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

68 files changed

+30356
-0
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/composer.lock
2+
.idea/
3+
vendor/
4+
composer.lock

.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 1;
12+
}
13+
14+
public static function getComponentName(): string
15+
{
16+
return 'PHP';
17+
}
18+
19+
public static function getComponentSlug(): string
20+
{
21+
return 'php';
22+
}
23+
24+
public static function isCompatibleWithPhp(int $major, int $minor): bool
25+
{
26+
return
27+
($major === 7 && $minor === 4);
28+
}
29+
30+
public static function getEntryPointFileName(): string
31+
{
32+
return 'public/index.php';
33+
}
34+
35+
public static function getBenchmarkUrl(): string
36+
{
37+
return '/';
38+
}
39+
40+
public static function getCoreDependencyName(): string
41+
{
42+
return 'php';
43+
}
44+
45+
public static function getCoreDependencyMajorVersion(): int
46+
{
47+
return 7;
48+
}
49+
50+
public static function getCoreDependencyMinorVersion(): int
51+
{
52+
return 4;
53+
}
54+
55+
public static function getCoreDependencyPatchVersion(): int
56+
{
57+
return 0;
58+
}
59+
60+
public static function getBenchmarkType(): int
61+
{
62+
return 4;
63+
}
64+
65+
public static function getSourceCodeUrls(): array
66+
{
67+
return [
68+
'entryPoint' => 'https://github.com/phpbenchmarks/php/blob/7.4_templating-small-overload/public/index.php'
69+
];
70+
}
71+
}

.phpbenchmarks/composer/composer.lock.php7.4

Lines changed: 19 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.phpbenchmarks/initBenchmark.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
set -e
4+
5+
# add commands to initialize benchmark: clear cache and logs, warm up cache etc
6+
composer install --no-dev --classmap-authoritative --ansi

0 commit comments

Comments
 (0)