PHPackages                             atrapalo/phpunit-memory-and-time-usage-listener - 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. [Testing &amp; Quality](/categories/testing)
4. /
5. atrapalo/phpunit-memory-and-time-usage-listener

ActiveLibrary[Testing &amp; Quality](/categories/testing)

atrapalo/phpunit-memory-and-time-usage-listener
===============================================

PHPUnit Listener for measure time and memory usage

1.0.0(11y ago)1739.2k↓41.1%7[1 issues](https://github.com/atrapalo/phpunit-memory-and-time-usage-listener/issues)[1 PRs](https://github.com/atrapalo/phpunit-memory-and-time-usage-listener/pulls)1PHPPHP &gt;=5.3.0

Since Apr 19Pushed 7y ago118 watchersCompare

[ Source](https://github.com/atrapalo/phpunit-memory-and-time-usage-listener)[ Packagist](https://packagist.org/packages/atrapalo/phpunit-memory-and-time-usage-listener)[ Docs](https://github.com/atrapalo/phpunit-memory-and-time-usage-listener)[ RSS](/packages/atrapalo-phpunit-memory-and-time-usage-listener/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (1)Versions (2)Used By (1)

PHPUnit Memory &amp; Time usage Listener
========================================

[](#phpunit-memory--time-usage-listener)

This PHPUnit listener provides information about each test time, memory and memory peak usage, with two versions configured by parameters:

- One in which at the end of the test suits shows the information for all the executed test.
- One in which you indicates the edge for all the measurements and it only shows the results if one ot them exceed it's edge.

If no parameter is defined on the phpunit.xml the default behaviour is to show all the results.

The arguments you can define on the phpunit.xml file are:

- showOnlyIfEdgeIsExceeded (boolean): The default value is false, if you set it to true is recommended to set the other three optional arguments.
- executionTimeEdge (int)(milliseconds): Only needed if `showOnlyIfEdgeIsExceeded` is set to true. The default value is 100 and indicates the limit of usage time for every test
- memoryUsageEdge (int)(bytes): Only needed if `showOnlyIfEdgeIsExceeded` is set to true. The default value is 1024 and indicates indicate the limit of memory usage for every usage
- memoryPeakDifferenceEdge (int)(bytes): Only needed if `showOnlyIfEdgeIsExceeded` is set to true. The default value is 1024 and indicates the maximum difference between memory peak.

Installation:
-------------

[](#installation)

The installation for use this listener it's as easy as require it with composer as any other. I recommend to indicate the requirement only for dev.

```
require-dev{
    "atrapalo/phpunit-memory-and-time-usage-listener": "dev-master"
}
```

Usage examples:
---------------

[](#usage-examples)

XML example for listener usage without edges:

```

```

XML example for listener usage with edges:

```

                         true

                         100

                         1024

                         10240

```

###  Health Score

36

—

LowBetter than 79% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity37

Limited adoption so far

Community17

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

4093d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/6730967?v=4)[Atrápalo](/maintainers/atrapalo)[@atrapalo](https://github.com/atrapalo)

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/atrapalo-phpunit-memory-and-time-usage-listener/health.svg)

```
[![Health](https://phpackages.com/badges/atrapalo-phpunit-memory-and-time-usage-listener/health.svg)](https://phpackages.com/packages/atrapalo-phpunit-memory-and-time-usage-listener)
```

###  Alternatives

[dms/phpunit-arraysubset-asserts

This package provides ArraySubset and related asserts once deprecated in PHPUnit 8

14429.2M361](/packages/dms-phpunit-arraysubset-asserts)

PHPackages © 2026

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