bakame/stackwatch

A minimalist, embeddable, multi-metric, and framework-agnostic profiler for PHP

0.13.0 2025-08-14 15:46 UTC

This package is auto-updated.

Last update: 2025-08-21 19:55:39 UTC


README

Stackwatch

Stackwatch

Author Software License Build Latest Version Total Downloads Sponsor development of this project

Stackwatch is a lightweight profiler for PHP 8.1+. It helps you measure performance with precision—without unnecessary complexity.

Stackwatch bridges the gap between basic timers and heavy profiling tools like PHPBench, Xdebug or Blackfire. It is perfect for:

  • Isolated performance testing
  • Annotated profiling of large codebases
  • Lightweight integration into dev workflows

Zero-dependency core. Optional CLI with familiar Symfony Console integration.

Installation

composer require bakame/stackwatch

You need:

  • PHP >= 8.1 but the latest stable version of PHP is recommended
  • the psr/log package or any package implementing the PHP-FIG log contract

To use the CLI command you will also need:

  • symfony/console and symfony/process

Documentation

Full documentation can be found at https://bakame-php.github.io/stackwatch/

Testing

The library has:

  • a PHPUnit test suite.
  • a coding style compliance test suite using PHP CS Fixer.
  • a code analysis compliance test suite using PHPStan.

To run the tests, run the following command from the project folder.

composer test

Contributing

Contributions are welcome and will be fully credited. Please see CONTRIBUTING and CONDUCT for details.

Security

If you discover any security related issues, please email nyamsprod@gmail.com instead of using the issue tracker.

Changelog

Please see CHANGELOG for more information on what has changed recently.

Credits