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(6mo ago)21[12 issues](https://github.com/ManolisCode/RuntimeMetrics/issues)MITPHPPHP &gt;=8.1CI passing

Since Oct 28Pushed 6mo 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/1981e429e100edfa6d0691400b3459d1391aa2798ade533300b9410aef15a02e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d616e6f6c6973636f64652f72756e74696d652d6d6574726963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/manoliscode/runtime-metrics)[![PHP Version](https://camo.githubusercontent.com/2a7d115d098995bc71296160d39651ef0c02ed3e71aae806477d48cc7f15b41c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6d616e6f6c6973636f64652f72756e74696d652d6d6574726963732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/manoliscode/runtime-metrics)[![CI](https://github.com/ManolisCode/RuntimeMetrics/workflows/CI/badge.svg)](https://github.com/ManolisCode/RuntimeMetrics/actions)[![License: MIT](https://camo.githubusercontent.com/fdf2982b9f5d7489dcf44570e714e3a15fce6253e0cc6b5aa61a075aac2ff71b/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d79656c6c6f772e737667)](LICENSE)[![codecov](https://camo.githubusercontent.com/da7dec42c098ab7af18caf0978e747aeb59a53f56f8b726ad548b98d904995f1/68747470733a2f2f636f6465636f762e696f2f67682f4d616e6f6c6973436f64652f52756e74696d654d6574726963732f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d524a4d59473145315030)](https://codecov.io/gh/ManolisCode/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 manoliscode/runtime-metrics
```

---

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

[](#quick-start)

```
