Skip to content

Commit 00fe863

Browse files
committed
Compatibilith with benchmark kit 4.0.0-DEV
1 parent de00953 commit 00fe863

File tree

14 files changed

+60
-115
lines changed

14 files changed

+60
-115
lines changed

.circleci/config.yml

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

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
/.idea/
2-
/vendor/
1+
/vendor
32
/composer.lock

.phpbenchmarks/AbstractComponentConfiguration.php

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

.phpbenchmarks/config.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
component:
2+
id: 1
3+
benchmark:
4+
type: 7
5+
relativeUrl: /
6+
sourceCode:
7+
entryPoint: public/index.php
8+
urls:
9+
jsonSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
10+
integerSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
11+
floatSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
12+
stringSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
13+
booleanSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
14+
nullSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
15+
arraySerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
16+
objectSerialization: 'https://github.com/phpbenchmarks/php/tree/7.3.13_json-serialization-hello-world_0/public/index.php#L15'
17+
coreDependency:
18+
name: php
19+
version: 7.3.13

.phpbenchmarks/vhost.conf renamed to .phpbenchmarks/nginx/vhost.conf

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
server {
2-
listen 80;
2+
listen ____PORT____;
33
server_name ____HOST____;
44
root ____INSTALLATION_PATH____/public;
55
location / {
@@ -12,6 +12,4 @@ server {
1212
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
1313
fastcgi_param HTTPS off;
1414
}
15-
error_log /var/log/nginx/benchmark_error.log;
16-
access_log /var/log/nginx/benchmark_access.log;
1715
}

.phpbenchmarks/composer/composer.lock.php7.3 renamed to .phpbenchmarks/php/7.3/composer.lock

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

.phpbenchmarks/php/7.3/php.ini

Whitespace-only changes.

README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,17 +6,15 @@
66

77
## What is www.phpbenchmarks.com?
88

9-
You will find lot of benchmarks for PHP frameworks, template engines and JSON serializers on [phpbenchmarks.com](http://www.phpbenchmarks.com).
9+
You will find a lot of benchmarks for PHP and PHP libraries on [phpbenchmarks.com](http://www.phpbenchmarks.com).
1010

1111
Benchmarks results are available from PHP 5.6 to latest version.
1212

1313
Our benchmarking protocol is available on [benchmarking protocol page](http://www.phpbenchmarks.com/en/documentation/benchmarking-protocol).
1414

1515
## What is this repository?
1616

17-
It contains PHP installation `only`.
18-
To reuse code between minor versions, features for benchmarks are not coded in this repository
19-
but in [phpbenchmarks/php-common](https://github.com/phpbenchmarks/php-common) repository.
17+
It contains PHP benchmark code.
2018

2119
Switch branch to select version and benchmark you want to see.
2220

@@ -33,12 +31,14 @@ Go to [community page](http://www.phpbenchmarks.com/en/community) to see the Hal
3331

3432
## How version works?
3533

36-
We do not follow semantic version for this repository. Here is an explanation about our versioning system:
34+
We do not follow semantic version for this repository.
3735

38-
`W` PHP major version.
36+
Here is an explanation about our versioning system:
3937

40-
`X` PHP minor version.
38+
`X.Y.Z_benchmark-slug_W`
4139

42-
`Y` PHP bugfix version.
43-
44-
`Z` Benchmark type: `6` JSON serialization of Hello world, `7` Small JSON serialization, `8` Big JSON serialization.
40+
* `X`: PHP major version.
41+
* `Y`: PHP minor version.
42+
* `Z`: PHP patch version.
43+
* `benchmark-slug`: slug of the benchmark, list available on [documentation page](http://www.phpbenchmarks.com/en/documentation).
44+
* `W`: benchmark version

composer.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"license": "proprietary",
44
"type": "project",
55
"require": {
6-
"php": "7.3.*",
6+
"php": "7.3.13",
77
"ext-json": "*",
88
"phpbenchmarks/benchmark-json-serialization-small-overload": "1.0.0"
99
},
1010
"autoload": {
1111
"psr-4": {
12-
"Php73\\BenchmarkJsonSerializationSmallOverload\\": "src/"
12+
"App\\": "src/"
1313
}
1414
}
1515
}

public/index.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
use Php73\BenchmarkJsonSerializationSmallOverload\ObjectToSerializeFactory\JsonSerializableFactory;
5+
use App\ObjectToSerializeFactory\JsonSerializableFactory;
66
use PhpBenchmarks\BenchmarkJsonSerializationSmallOverload\BenchmarkService;
77

88
require __DIR__ . '/../vendor/autoload.php';

src/ObjectToSerialize/JsonSerializableToSerialize.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
declare(strict_types=1);
44

5-
namespace Php73\BenchmarkJsonSerializationSmallOverload\ObjectToSerialize;
5+
namespace App\ObjectToSerialize;
66

77
use PhpBenchmarks\BenchmarkJsonSerializationSmallOverload\ObjectToSerialize\ObjectToSerialize;
88

src/ObjectToSerializeFactory/JsonSerializableFactory.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
declare(strict_types=1);
44

5-
namespace Php73\BenchmarkJsonSerializationSmallOverload\ObjectToSerializeFactory;
5+
namespace App\ObjectToSerializeFactory;
66

7-
use Php73\BenchmarkJsonSerializationSmallOverload\ObjectToSerialize\JsonSerializableToSerialize;
7+
use App\ObjectToSerialize\JsonSerializableToSerialize;
88
use PhpBenchmarks\BenchmarkJsonSerializationSmallOverload\{
99
ObjectToSerialize\ObjectToSerializeInterface,
1010
ObjectToSerializeFactory\ObjectToSerializeFactoryInterface

0 commit comments

Comments
 (0)