diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 0000000..041b39b --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,21 @@ +version: '2.1' + +jobs: + ValidateBenchmark: + docker: + - image: phpbenchmarks/benchmark-kit:4 + working_directory: /var/www/benchmark + steps: + - checkout + - run: + name: /var/entrypoint.sh + command: /var/entrypoint.sh --nginx-as-service + - run: + name: "benchmark:validate" + command: "/var/benchmark-kit/bin/console benchmark:validate:all" + +workflows: + version: '2.1' + BenchmarkKit: + jobs: + - ValidateBenchmark diff --git a/.phpbenchmarks/AbstractComponentConfiguration.php b/.phpbenchmarks/AbstractComponentConfiguration.php deleted file mode 100644 index d5df375..0000000 --- a/.phpbenchmarks/AbstractComponentConfiguration.php +++ /dev/null @@ -1,85 +0,0 @@ - 'https://github.com/phpbenchmarks/php/blob/php_7.2_json-serialization-hello-world/public/index.php#L12' - ]; - } -} diff --git a/.phpbenchmarks/config.yml b/.phpbenchmarks/config.yml new file mode 100644 index 0000000..0f6cc85 --- /dev/null +++ b/.phpbenchmarks/config.yml @@ -0,0 +1,12 @@ +component: + id: 1 +benchmark: + type: 6 + relativeUrl: / +sourceCode: + entryPoint: public/index.php + urls: + jsonSerialization: 'https://github.com/phpbenchmarks/php/tree/7.2.26_json-serialization-hello-world_0/public/index.php#L12' +coreDependency: + name: php + version: 7.2.26 diff --git a/.phpbenchmarks/vhost.conf b/.phpbenchmarks/nginx/vhost.conf similarity index 79% rename from .phpbenchmarks/vhost.conf rename to .phpbenchmarks/nginx/vhost.conf index 2caa86c..d7dba5a 100644 --- a/.phpbenchmarks/vhost.conf +++ b/.phpbenchmarks/nginx/vhost.conf @@ -1,5 +1,5 @@ server { - listen 80; + listen ____PORT____; server_name ____HOST____; root ____INSTALLATION_PATH____/public; location / { @@ -12,6 +12,4 @@ server { fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param HTTPS off; } - error_log /var/log/nginx/benchmark_error.log; - access_log /var/log/nginx/benchmark_access.log; } diff --git a/.phpbenchmarks/composer/composer.lock.php7.2 b/.phpbenchmarks/php/7.2/composer.lock similarity index 95% rename from .phpbenchmarks/composer/composer.lock.php7.2 rename to .phpbenchmarks/php/7.2/composer.lock index 68f3413..f7937c9 100644 --- a/.phpbenchmarks/composer/composer.lock.php7.2 +++ b/.phpbenchmarks/php/7.2/composer.lock @@ -4,7 +4,7 @@ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies", "This file is @generated automatically" ], - "content-hash": "bcf98b1cd0abc28db0b0d85b169ed2ec", + "content-hash": "e81c969c49179af70c9b9fd3ef90c3d9", "packages": [ { "name": "phpbenchmarks/benchmark-json-serialization-hello-world", @@ -44,7 +44,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "7.2.*", + "php": "7.2.26", "ext-json": "*" }, "platform-dev": [] diff --git a/.phpbenchmarks/initBenchmark.sh b/.phpbenchmarks/php/7.2/initBenchmark.sh similarity index 100% rename from .phpbenchmarks/initBenchmark.sh rename to .phpbenchmarks/php/7.2/initBenchmark.sh diff --git a/.phpbenchmarks/php/7.2/php.ini b/.phpbenchmarks/php/7.2/php.ini new file mode 100644 index 0000000..e69de29 diff --git a/.phpbenchmarks/responseBody/responseBody.json b/.phpbenchmarks/php/7.2/responseBody/responseBody.json similarity index 100% rename from .phpbenchmarks/responseBody/responseBody.json rename to .phpbenchmarks/php/7.2/responseBody/responseBody.json diff --git a/README.md b/README.md index f162035..a8aaba5 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ ## What is www.phpbenchmarks.com? -You will find lot of benchmarks for PHP frameworks, template engines and JSON serializers on [phpbenchmarks.com](http://www.phpbenchmarks.com). +You will find a lot of benchmarks for PHP and PHP libraries on [phpbenchmarks.com](http://www.phpbenchmarks.com). Benchmarks results are available from PHP 5.6 to latest version. @@ -14,9 +14,7 @@ Our benchmarking protocol is available on [benchmarking protocol page](http://ww ## What is this repository? -It contains PHP installation `only`. -To reuse code between minor versions, features for benchmarks are not coded in this repository -but in [phpbenchmarks/php-common](https://github.com/phpbenchmarks/php-common) repository. +It contains PHP benchmark code. Switch branch to select version and benchmark you want to see. @@ -33,12 +31,14 @@ Go to [community page](http://www.phpbenchmarks.com/en/community) to see the Hal ## How version works? -We do not follow semantic version for this repository. Here is an explanation about our versioning system: +We do not follow semantic version for this repository. -`W` PHP major version. +Here is an explanation about our versioning system: -`X` PHP minor version. +`X.Y.Z_benchmark-slug_W` -`Y` PHP bugfix version. - -`Z` Benchmark type: `6` JSON serialization of Hello world, `7` Small JSON serialization, `8` Big JSON serialization. +* `X`: PHP major version. +* `Y`: PHP minor version. +* `Z`: PHP patch version. +* `benchmark-slug`: slug of the benchmark, list available on [documentation page](http://www.phpbenchmarks.com/en/documentation). +* `W`: benchmark version diff --git a/composer.json b/composer.json index 449628e..9c37742 100644 --- a/composer.json +++ b/composer.json @@ -3,8 +3,8 @@ "license": "proprietary", "type": "project", "require": { - "php": "7.2.*", + "php": "7.2.26", "ext-json": "*", "phpbenchmarks/benchmark-json-serialization-hello-world": "1.0.0" } -} +} \ No newline at end of file diff --git a/public/index.php b/public/index.php index 282463e..06ee540 100644 --- a/public/index.php +++ b/public/index.php @@ -11,5 +11,3 @@ } else { json_encode(BenchmarkService::getDataToSerialize()); } - -// require phpbenchmarks stats.php here when needed