PHPackages                             audunru/memory-usage - 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. [Debugging &amp; Profiling](/categories/debugging)
4. /
5. audunru/memory-usage

ActiveLibrary[Debugging &amp; Profiling](/categories/debugging)

audunru/memory-usage
====================

Log memory usage in Laravel

v5.0.0(1mo ago)03.2k↑16.7%MITPHPPHP ^8.3CI passing

Since Jan 16Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/audunru/memory-usage)[ Packagist](https://packagist.org/packages/audunru/memory-usage)[ RSS](/packages/audunru-memory-usage/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (16)Versions (31)Used By (0)

Log Laravel Memory usage
========================

[](#log-laravel-memory-usage)

[![Build Status](https://github.com/audunru/memory-usage/actions/workflows/validate.yml/badge.svg)](https://github.com/audunru/memory-usage/actions/workflows/validate.yml)[![Coverage Status](https://camo.githubusercontent.com/fd6e25bfeaf62a50dfd15c1e72ccb9c05696e8eb9389115b44b7e75a6f541de3/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f617564756e72752f6d656d6f72792d75736167652f62616467652e7376673f6272616e63683d6d61696e)](https://coveralls.io/github/audunru/memory-usage?branch=main)

Log amount of memory used during HTTP requests. The peak memory usage in megabytes will be logged right before the response is returned.

The memory limit is configurable per request path. If you set the limit to 25 MiB for all requests, you will see something like this in your logs:

```
[2022-01-16 10:49:17] local.WARNING: Maximum memory 50.68 MiB used during request for /api/v1/companies/1/products is greater than limit of 25.00 MiB
[2022-01-16 10:49:29] local.WARNING: Maximum memory 50.39 MiB used during request for /api/v1/companies/1 is greater than limit of 25.00 MiB
[2022-01-16 10:49:29] local.WARNING: Maximum memory 60.04 MiB used during request for /api/v1/companies/1/sales is greater than limit of 25.00 MiB

```

Since v0.3.0 you can also log slow responses. If you set the limit to 3 seconds, you you will see something like this in your logs:

```
[2022-01-16 10:49:17] local.WARNING: Response time 5.15 s for /api/v1/companies/1/products is greater than limit of 3.00 s

```

Installation
============

[](#installation)

Step 1: Install with Composer
-----------------------------

[](#step-1-install-with-composer)

```
composer require audunru/memory-usage
```

Configuration
=============

[](#configuration)

Publish the configuration file by running:

```
php artisan vendor:publish --tag=memory-usage-config
```

Please open up the configuration file for further instructions on how to configure logging.

Development
===========

[](#development)

Testing
-------

[](#testing)

Run tests:

```
composer test
```

###  Health Score

53

—

FairBetter than 97% of packages

Maintenance89

Actively maintained with recent releases

Popularity21

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity75

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~58 days

Recently: every ~43 days

Total

27

Last Release

56d ago

Major Versions

v0.5.0 → v1.0.02023-07-18

v1.0.1 → v2.0.02024-04-07

v2.0.8 → v3.0.02025-03-16

v3.0.0 → v4.0.02025-03-22

v4.0.5 → v13.x-dev2026-03-24

PHP version history (4 changes)v0.1.0PHP ^8.0

v1.0.0PHP ^8.1

v2.0.0PHP ^8.2

v13.x-devPHP ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/444043228e007e4f695d18a30380b811fb60077138f7c46f111f45a1b98e2f1c?d=identicon)[audunru](/maintainers/audunru)

---

Top Contributors

[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (52 commits)")[![audunru](https://avatars.githubusercontent.com/u/5163790?v=4)](https://github.com/audunru "audunru (43 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (15 commits)")[![semantic-release-bot](https://avatars.githubusercontent.com/u/32174276?v=4)](https://github.com/semantic-release-bot "semantic-release-bot (2 commits)")

---

Tags

laraveldebugmemoryusage

###  Code Quality

TestsPHPUnit

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/audunru-memory-usage/health.svg)

```
[![Health](https://phpackages.com/badges/audunru-memory-usage/health.svg)](https://phpackages.com/packages/audunru-memory-usage)
```

###  Alternatives

[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.2k124.3M624](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-telescope-toolbar

Toolbar for Laravel Telescope based on Symfony Web Profiler

8041.6M3](/packages/fruitcake-laravel-telescope-toolbar)[recca0120/laravel-tracy

A Laravel Package to integrate Nette Tracy Debugger

388283.0k3](/packages/recca0120-laravel-tracy)[laracraft-tech/laravel-xhprof

Easy XHProf setup to profile your laravel application!

235321.4k](/packages/laracraft-tech-laravel-xhprof)[daylerees/anbu

The Anbu profiler for Laravel 4.

3054.9k](/packages/daylerees-anbu)[spatie/laravel-artisan-dd

Run dd from your commandline

16387.7k1](/packages/spatie-laravel-artisan-dd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
