mute / pinba
Implements Pinba in pure PHP
Installs: 12
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/mute/pinba
Requires
- php: >=5.3.0
Requires (Dev)
- phpunit/phpunit: 3.7.*
This package is not auto-updated.
Last update: 2025-10-06 19:33:37 UTC
README
Implements Pinba in pure PHP. See examples for usage.
This library package requires PHP 5.3 or later.
How to use this library
Monitor a script, with a timer:
<?php $collector = new \Mute\Pinba\DataCollector(SCRIPT_NAME, HOST_NAME); // start monitoring $collector->start(); // monitor a function $timer = $collector->timer(array('foo' => 'bar'))->start(); func(); $timer->stop(); // stop monitoring $collector->stop(); // send result to Pinba Server $reporter = new \Mute\Pinba\Reporter(ADDRESS_HOST, ADDRESS_PORT); $reporter($collector);