An open API service indexing awesome lists of open source software.

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.

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.**

![Alt php-bench](https://github.com/nafigator/php-bench/raw/master/screen.png)

### 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