Skip to content

nafigator/php-bench

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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!

About

⏰ Tools for benchmark PHP algorithms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages