Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/jpcaparas/phpbench-example


https://github.com/jpcaparas/phpbench-example

Last synced: about 10 hours ago
JSON representation

Awesome Lists containing this project

README

        

# Overview

An example project that benchmarks the performance of functions and methods using [PHPBench](https://github.com/phpbench/phpbench).


Running PHPBench

## Usage

Install dependencies

composer install

Run all the benchmarks

vendor/bin/phpbench run tests/Benchmarks --report=aggregate

Run a single benchmark case

vendor/bin/phpbench run tests/Benchmarks/StringBench.php --report=aggregate

## Things to keep in mind

- Stability can be inferred from rstdev (relative standard deviation) , with 0% being the best and anything above 2% should be treated as suspicious.

## References

- [Quick start guide](https://phpbench.readthedocs.io/en/latest/quick-start.html)