kelunik/loop-block

Detect blocking ticks in the Amp event loop.

Maintainers

Package info

github.com/kelunik/loop-block

pkg:composer/kelunik/loop-block

Statistics

Installs: 7 066

Dependents: 3

Suggesters: 0

Stars: 26

Open Issues: 0

v1.0.0 2017-06-15 17:41 UTC

This package is auto-updated.

Last update: 2026-02-15 09:37:28 UTC


README

Detect blocking ticks in an event loop based on the PHP event loop standard.

Installation

$ composer install kelunik/loop-block

Usage

You can instantiate a new BlockDetector. Its constructor takes a callback to be executed on blocks, a threshold in milliseconds, and an interval to configure how often the check is executed.

Once the loop runs, you can call BlockDetector::start to start the detection. BlockDetector::stop stops the detection again.

License

MIT.