phpbench/phpbench

PHP Benchmarking Framework

Installs: 594 829

Dependents: 271

Suggesters: 9

Security: 0

Stars: 1 170

Watchers: 36

Forks: 76

Open Issues: 64

1.0.0-alpha2 2020-10-25 10:55 UTC

README

92305960-d2866a00-ef83-11ea-878a-10584e583da4.png

Build Status Latest Stable Version Total Downloads License

PHPBench is a benchmark runner for PHP analagous to PHPUnit but for performance rather than correctness.

Features include:

  • Revolutions: Repeat your code many times to determine average execution time.
  • Iterations: Sample your revolutions many times and review aggregated statistical data.
  • Process Isolation: Each iteration is executed in a separate process.
  • Reporting: Customizable reports and various output formats (e.g. console, CSV, Markdown, HTML).
  • Report storage and comparison: Store benchmarks locally to be used as a baseline reference, or to reference them later.
  • Memory Usage: Keep an eye on the amount of memory used by benchmarking subjects.
  • Assertions: Assert that code is performing within acceptable limits, or that it has not regressed from a previously recorded baseline.

See the documentation to find out more.

Installation

$ composer require phpbench/phpbench --dev

See the installation instructions for more options.

Documentation

Documentation is hosted on readthedocs.

Community

Screenshots

Default output:

phpbench-standard

Blinken logger:

phpbench-blinken

HTML report:

phpbench2

Contributing

PHPBench is an open source project. If you find an problem or want to discuss new features or improvements please create an issue, and/or if possible create a pull request.