-
Notifications
You must be signed in to change notification settings - Fork 1
Installation
PerformanceMeter is distributed on Packagist as initphp/performance-meter and follows Semantic Versioning.
| Requirement | Version |
|---|---|
| PHP | 8.1 or higher |
| Composer | Optional (manual include is supported) |
| Extensions | None |
The package has no runtime dependencies — installing it adds exactly two PHP files to your autoloader.
composer require initphp/performance-meterThen in your application:
require __DIR__ . '/vendor/autoload.php';
use InitPHP\PerformanceMeter\PerformanceMeter;To pin the major version explicitly:
composer require initphp/performance-meter:^2.0Because the package is two files in one namespace, manual inclusion works:
require __DIR__ . '/path/to/src/Exception/PointerNotFoundException.php';
require __DIR__ . '/path/to/src/PerformanceMeter.php';
use InitPHP\PerformanceMeter\PerformanceMeter;Order matters only if you intend to catch the exception — PerformanceMeter.php references the exception class but does not eagerly load it.
A one-line smoke test:
echo InitPHP\PerformanceMeter\PerformanceMeter::peakMemoryUsage();If you see something like 2.50MB, the package is wired up correctly.
composer update initphp/performance-meterRead the Changelog before crossing a major version — v1 → v2 has intentional breaking changes.
composer remove initphp/performance-meterThere is no global state, configuration file, cache, or DB schema to clean up. The package is purely in-process.
- Quick Start — your first measurement in two minutes.
- Concepts — the small handful of ideas the rest of the wiki builds on.
initphp/performance-meter · MIT License · part of the InitPHP family
Source · Issues · Discussions · Packagist · Changelog · Contributing · Security Policy
Getting Started
Reference
Recipes
Migration & Help