PHPackages                             manoliscode/runtime-metrics - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. manoliscode/runtime-metrics

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

manoliscode/runtime-metrics
===========================

RuntimeMetrics helps you track execution time and performance metrics in PHP, an easy foundation for benchmarking your applications.

v1.0.1(8mo ago)21[12 issues](https://github.com/ManolisCode/RuntimeMetrics/issues)MITPHPPHP &gt;=8.1CI passing

Since Oct 28Pushed 2w ago1 watchersCompare

[ Source](https://github.com/ManolisCode/RuntimeMetrics)[ Packagist](https://packagist.org/packages/manoliscode/runtime-metrics)[ RSS](/packages/manoliscode-runtime-metrics/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

RuntimeMetrics
==============

[](#runtimemetrics)

[![Latest Version on Packagist](https://camo.githubusercontent.com/07b1c52b5e3b57afad3e30e91b1c1f618e594db544f35197775ec7c90f69d860/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d6d616e74616b6f732f72756e74696d652d6d6574726963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mmantakos/runtime-metrics)[![PHP Version](https://camo.githubusercontent.com/b023d80267c801117461328df85c156bd52e92e85beeaaf73b0c9ff819a967d5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d6d616e74616b6f732f72756e74696d652d6d6574726963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mmantakos/runtime-metrics)[![CI](https://github.com/mmantakos/RuntimeMetrics/workflows/CI/badge.svg)](https://github.com/mmantakos/RuntimeMetrics/actions)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)[![codecov](https://camo.githubusercontent.com/e87d86cd755edaad20c1e2953a9ce73d702f765cbb411faec9d95225d1008ffc/68747470733a2f2f636f6465636f762e696f2f67682f6d6d616e74616b6f732f52756e74696d654d6574726963732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d524a4d59473145315030)](https://codecov.io/gh/mmantakos/RuntimeMetrics)
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

[](#)

Synopsis
--------

[](#synopsis)

A lightweight PHP library for tracking **execution time** and **memory usage** of your code, with multiple named timers, lap support, human-readable reports, and JSON export. Perfect for benchmarking, profiling, and performance monitoring.

---

Features
--------

[](#features)

- Start, stop, and lap multiple timers
- Measure memory usage and peak memory
- Human-readable formatting (e.g., `2.45 MB`, `125 ms`)
- Generate reports for single or all timers
- Export metrics as structured arrays or JSON
- Easy to integrate in any PHP project
- Fully unit-tested

---

Installation
------------

[](#installation)

Install via Composer:

```
composer require mmantakos/runtime-metrics
```

---

Quick Start
-----------

[](#quick-start)

```
