diff --git a/composer.json b/composer.json index 16c42e5..8ee4cdc 100644 --- a/composer.json +++ b/composer.json @@ -22,7 +22,8 @@ "drupol/php-conventions": "^1.7", "infection/infection": "^0.13.6 || ^0.15.0", "phpunit/phpunit": "^7 || ^8", - "vimeo/psalm": "^3.11" + "vimeo/psalm": "^3.11", + "phpbench/phpbench": "@dev" }, "autoload": { "psr-4": { @@ -35,6 +36,7 @@ } }, "scripts": { - "grumphp": "grumphp run" + "grumphp": "grumphp run", + "bench": "phpbench run benchmarks/*.php --report=aggregate --retry-threshold=5" } } diff --git a/phpbench.json b/phpbench.json deleted file mode 100644 index e68ab14..0000000 --- a/phpbench.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "bootstrap": "vendor/autoload.php" -} diff --git a/phpbench.json.dist b/phpbench.json.dist new file mode 100644 index 0000000..a828502 --- /dev/null +++ b/phpbench.json.dist @@ -0,0 +1,20 @@ +{ + "bootstrap": "vendor/autoload.php", + "path": "./benchmarks", + "retry_threshold": 5, + "outputs": { + "my_output": { + "extends": "html", + "file": "./build/my_report.html", + "title": "Hello World" + } + }, + "reports": { + "my_report": { + "extends": "aggregate" + } + }, + "extensions": { + "PhpBench\\Extensions\\Reports\\ReportsExtension" + } +}