Skip to content

Latest commit

 

History

History
76 lines (51 loc) · 1.48 KB

README.md

File metadata and controls

76 lines (51 loc) · 1.48 KB

GitHub license Conventional Commits

php-bench

Console tools for benchmark PHP algorithms.

Alt php-bench

Requirements:

  • PHP CLI 5.4+

Installation:

git clone https://github.com/nafigator/php-bench.git
cd php-bench
git submodule update --init

Usage:

Create copy of test executable and modify your local settings:

cp test-example test

Show available tests:

./test-list

Create test skeleton:

./test-new <Test name> [<Block count>]

Test name - name of new test class.
Block count - how much test blocks generate

Run test:

./test <Class>

Class - class name from Tests directory.

Examples:

./test CloneVsNew
./test IncludeVsRequire

Run all tests:

for name in $(find Tests -type f -name '*.php' | sed 's/^Tests\/\(.*\)\.php/\1/');
	do echo;echo $name;echo; ./test $name;
done;

If you'd like to see other PHP-algorithm comparison in this collection, feel free to create a new issue. Thanks!