|
34 | 34 | "process-timeout": 600, |
35 | 35 | "allow-plugins": { |
36 | 36 | "bamarni/composer-bin-plugin": true, |
37 | | - "infection/extension-installer": true |
| 37 | + "infection/extension-installer": true, |
| 38 | + "phpbench/extension-installer": true |
38 | 39 | } |
39 | 40 | }, |
40 | 41 | "extra": { |
|
70 | 71 | "docker:lint": "docker run --rm -i hadolint/hadolint < .docker/Dockerfile", |
71 | 72 | "sh:lint": "shfmt -d scripts", |
72 | 73 | "sh:security": "shellcheck scripts/*.sh", |
73 | | - "profile:xdebug": "XDEBUG_MODE=profile php benchmarks/profile.php", |
74 | 74 | "test:unit": "vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit --testsuite unit", |
75 | 75 | "test:integration": "vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit --testsuite integration", |
76 | 76 | "test:coverage": "XDEBUG_MODE=coverage vendor-bin/phpunit/vendor/phpunit/phpunit/phpunit --coverage-text --coverage-clover=build/coverage/clover.xml", |
77 | 77 | "mutation:test": "vendor-bin/mutation/vendor/infection/infection/bin/infection --threads=max", |
78 | | - "performance:check": "php benchmarks/compiler-benchmark.php", |
| 78 | + "benchmark:run": "vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --config=phpbench.json --report=aggregate", |
| 79 | + "benchmark:run:ci": "mkdir -p build && vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --config=phpbench.json --iterations=20 --revs=10 --warmup=2 --progress=plain --report=aggregate --dump-file=build/benchmark-results.xml", |
| 80 | + "benchmark:baseline:update": "mkdir -p build && vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --config=phpbench.json --iterations=20 --revs=10 --warmup=2 --progress=plain --report=aggregate --dump-file=build/benchmark-results.xml --store --tag=baseline", |
| 81 | + "benchmark:baseline:check": "vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench run --config=phpbench.json --iterations=20 --revs=10 --warmup=2 --progress=plain --report=aggregate --ref=baseline --assert=\"mode(variant.time.avg) <= mode(baseline.time.avg) +/- 25%\"", |
| 82 | + "benchmark:baseline:exists": "vendor-bin/phpbench/vendor/phpbench/phpbench/bin/phpbench log --config=phpbench.json | grep -q 'Tag: baseline'", |
79 | 83 | "bin": [ |
80 | 84 | "composer bin all list" |
81 | 85 | ] |
|
0 commit comments