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/.gitignore b/.gitignore index 072705c..4fbb073 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,2 @@ -.idea/ -vendor/ -composer.lock +/vendor/ +/composer.lock diff --git a/.phpbenchmarks/config.yml b/.phpbenchmarks/config.yml new file mode 100644 index 0000000..07bbaae --- /dev/null +++ b/.phpbenchmarks/config.yml @@ -0,0 +1,12 @@ +component: + id: 1 +benchmark: + type: 1 + relativeUrl: / +sourceCode: + entryPoint: public/index.php + urls: + entryPoint: 'https://github.com/phpbenchmarks/php/blob/7.3.13_hello-world_0/public/index.php' +coreDependency: + name: php + version: 7.3.13 diff --git a/.phpbenchmarks/nginx/vhost.conf b/.phpbenchmarks/nginx/vhost.conf new file mode 100644 index 0000000..d7dba5a --- /dev/null +++ b/.phpbenchmarks/nginx/vhost.conf @@ -0,0 +1,15 @@ +server { + listen ____PORT____; + server_name ____HOST____; + root ____INSTALLATION_PATH____/public; + location / { + try_files $uri /index.php$is_args$args; + } + location ~ ^/(index).php(/|$) { + fastcgi_pass unix:/run/php/____PHP_FPM_SOCK____; + fastcgi_split_path_info ^(.+.php)(/.*)$; + include fastcgi_params; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + fastcgi_param HTTPS off; + } +} diff --git a/composer.lock.php7.3 b/.phpbenchmarks/php/7.3/composer.lock similarity index 85% rename from composer.lock.php7.3 rename to .phpbenchmarks/php/7.3/composer.lock index 2bead8e..0587c53 100644 --- a/composer.lock.php7.3 +++ b/.phpbenchmarks/php/7.3/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": "3443ee71e9aa1f6e4759993fb6d2a664", + "content-hash": "6c89b8e8648f2ec83e7190f57e671df6", "packages": [], "packages-dev": [], "aliases": [], @@ -13,7 +13,7 @@ "prefer-stable": false, "prefer-lowest": false, "platform": { - "php": "7.3.*" + "php": "7.3.13" }, "platform-dev": [] } diff --git a/.phpbenchmarks/php/7.3/initBenchmark.sh b/.phpbenchmarks/php/7.3/initBenchmark.sh new file mode 100755 index 0000000..f61c58a --- /dev/null +++ b/.phpbenchmarks/php/7.3/initBenchmark.sh @@ -0,0 +1,5 @@ +#!/usr/bin/env bash + +set -e + +composer install --no-dev --classmap-authoritative --ansi diff --git a/.phpbenchmarks/php/7.3/php.ini b/.phpbenchmarks/php/7.3/php.ini new file mode 100644 index 0000000..e69de29 diff --git a/.phpbenchmarks/php/7.3/responseBody/responseBody.txt b/.phpbenchmarks/php/7.3/responseBody/responseBody.txt new file mode 100644 index 0000000..1c8a3a1 --- /dev/null +++ b/.phpbenchmarks/php/7.3/responseBody/responseBody.txt @@ -0,0 +1 @@ +Hello World ! \ No newline at end of file diff --git a/README.md b/README.md index b0ec41b..b12a8b1 100644 --- a/README.md +++ b/README.md @@ -4,24 +4,43 @@ www.phpbenchmarks.com

-## What is www.phpbenchmarks.com ? +## What is www.phpbenchmarks.com? -You will find lot of benchmarks for PHP frameworks and template engines. +You will find a lot of benchmarks for PHP and PHP libraries on [phpbenchmarks.com](http://www.phpbenchmarks.com). -You can compare results between Apache Bench and Siege, and PHP 5.6 to 7.3. +Benchmarks results are available from PHP 5.6 to latest version. -## What is this repository ? +Our benchmarking protocol is available on [benchmarking protocol page](http://www.phpbenchmarks.com/en/documentation/benchmarking-protocol). -It's benchmark common code for PHP benchmarks. +## What is this repository? -Switch branch to select your PHP major version and benchmark you want to see. +It contains PHP benchmark code. -See all PHP benchmarked versions on [phpbenchmarks/php](https://github.com/phpbenchmarks/php). +Switch branch to select version and benchmark you want to see. -You can find how we benchmark on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark-protocol.html). +You can find source code links into [Configuration::getSourceCodeUrls()](.phpbenchmarks/Configuration.php). ## Benchmarks -You can find all PHP benchmarks results on [phpbenchmarks.com](http://www.phpbenchmarks.com/en/benchmark/php.html). +You can find PHP 7.3 benchmarks results on +[benchmarks results page](http://www.phpbenchmarks.com/en/benchmark/php/7.3). -Scores are too low ? Do not hesitate to create a pull request, and ask a new benchmark ! +See all PHP benchmarked versions on [select version page](http://www.phpbenchmarks.com/en/benchmark/php/version). + +## Community + +Go to [community page](http://www.phpbenchmarks.com/en/community) to see the Hall of fame, or download the benchmark kit to add your code! + +## How version works? + +We do not follow semantic version for this repository. + +Here is an explanation about our versioning system: + +`X.Y.Z_benchmark-slug_W` + +* `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 547d173..05baeeb 100644 --- a/composer.json +++ b/composer.json @@ -3,6 +3,6 @@ "license": "proprietary", "type": "project", "require": { - "php": "7.3.*" + "php": "7.3.13" } } diff --git a/init_benchmark.sh b/init_benchmark.sh deleted file mode 100755 index 9ee4ef3..0000000 --- a/init_benchmark.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -function init() { - composer install --no-dev --classmap-authoritative - [ "$?" != "0" ] && exit 1 - - return 0 -} diff --git a/public/index.php b/public/index.php index 227f831..df7fd96 100644 --- a/public/index.php +++ b/public/index.php @@ -3,5 +3,3 @@ declare(strict_types=1); echo 'Hello World !'; - -// require phpbenchmarks stats.php here when needed