https://github.com/nafigator/php-bench
:alarm_clock: Tools for benchmark PHP algorithms.
https://github.com/nafigator/php-bench
benchmarking php tool
Last synced: about 1 year ago
JSON representation
:alarm_clock: Tools for benchmark PHP algorithms.
- Host: GitHub
- URL: https://github.com/nafigator/php-bench
- Owner: nafigator
- License: bsd-3-clause
- Created: 2013-08-20T13:20:35.000Z (almost 13 years ago)
- Default Branch: master
- Last Pushed: 2025-01-20T09:11:37.000Z (over 1 year ago)
- Last Synced: 2025-03-28T09:03:48.540Z (about 1 year ago)
- Topics: benchmarking, php, tool
- Language: PHP
- Homepage:
- Size: 286 KB
- Stars: 36
- Watchers: 4
- Forks: 7
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[![GitHub license][License img]][License src] [![Conventional Commits][Conventional commits badge]][Conventional commits src]
php-bench
=========
**Console tools for benchmark PHP algorithms.**

### Requirements:
* PHP CLI 5.4+
### Installation:
```bash
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:
```text
cp test-example test
```
Show available tests:
```text
./test-list
```
Create test skeleton:
```text
./test-new []
```
**Test name** - name of new test class.
**Block count** - how much test blocks generate
Run test:
```text
./test
```
**Class** - class name from Tests directory.
### Examples:
```text
./test CloneVsNew
./test IncludeVsRequire
```
### Run all tests:
```bash
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!
[License img]: https://img.shields.io/github/license/nafigator/php-bench?color=teal
[License src]: https://tldrlegal.com/license/bsd-3-clause-license-(revised)
[Conventional commits src]: https://conventionalcommits.org
[Conventional commits badge]: https://img.shields.io/badge/Conventional%20Commits-1.0.0-teal.svg