Skip to content

Installation

Muhammet Şafak edited this page May 25, 2026 · 1 revision

Installation

PerformanceMeter is distributed on Packagist as initphp/performance-meter and follows Semantic Versioning.

Requirements

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.

With Composer (recommended)

composer require initphp/performance-meter

Then in your application:

require __DIR__ . '/vendor/autoload.php';

use InitPHP\PerformanceMeter\PerformanceMeter;

To pin the major version explicitly:

composer require initphp/performance-meter:^2.0

Without Composer

Because 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.

Verifying the installation

A one-line smoke test:

echo InitPHP\PerformanceMeter\PerformanceMeter::peakMemoryUsage();

If you see something like 2.50MB, the package is wired up correctly.

Updating

composer update initphp/performance-meter

Read the Changelog before crossing a major version — v1 → v2 has intentional breaking changes.

Removing

composer remove initphp/performance-meter

There is no global state, configuration file, cache, or DB schema to clean up. The package is purely in-process.

Next

  • Quick Start — your first measurement in two minutes.
  • Concepts — the small handful of ideas the rest of the wiki builds on.

Clone this wiki locally