PHPackages                             mathisburger/phpunit-stopwatch - 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. mathisburger/phpunit-stopwatch

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

mathisburger/phpunit-stopwatch
==============================

A php library for phpunit to test the performance of php applications

v1.0.0(3y ago)02PHPPHP ^7.4 || 8.0.\*

Since Oct 22Pushed 3y ago1 watchersCompare

[ Source](https://github.com/MathisBurger/phpunit-stopwatch)[ Packagist](https://packagist.org/packages/mathisburger/phpunit-stopwatch)[ RSS](/packages/mathisburger-phpunit-stopwatch/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (3)Versions (2)Used By (0)

phpunit-stopwatch
=================

[](#phpunit-stopwatch)

---

**A php library that provides some traits and testcases for phpunit for performance and memory tests**
[![](https://camo.githubusercontent.com/c437c3001ac8926c1d58cf11c57e88b2fa5c06e21234831b2a5b24343e0ca332/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d61746869736275726765722f706870756e69742d73746f7077617463683f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/c437c3001ac8926c1d58cf11c57e88b2fa5c06e21234831b2a5b24343e0ca332/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d61746869736275726765722f706870756e69742d73746f7077617463683f7374796c653d666f722d7468652d6261646765)[![](https://camo.githubusercontent.com/8610c44f4101fd89369c845b2685fec73e2aa32dfff0c5ee7f6ef3e03bc91cc7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636865636b732d7374617475732f6d61746869736275726765722f6d61746869732d6275726765722e64652f6d61696e3f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/8610c44f4101fd89369c845b2685fec73e2aa32dfff0c5ee7f6ef3e03bc91cc7/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f636865636b732d7374617475732f6d61746869736275726765722f6d61746869732d6275726765722e64652f6d61696e3f7374796c653d666f722d7468652d6261646765)[![](https://camo.githubusercontent.com/8f60b1a85ff23f58a54dcc1783ed6597f823df7de564f86d616e12d56a488985/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d61746869736275726765722f706870756e69742d73746f7077617463683f7374796c653d666f722d7468652d6261646765)](https://camo.githubusercontent.com/8f60b1a85ff23f58a54dcc1783ed6597f823df7de564f86d616e12d56a488985/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f6d61746869736275726765722f706870756e69742d73746f7077617463683f7374796c653d666f722d7468652d6261646765)

---

Project information
===================

[](#project-information)

Phpunit stopwatch is a simple php library that uses phpunit and stopwatch to perform tests on the memory usage and execution time of some php functions. It provides a simple test case as well as a trait that can be implemented in custom test cases.

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

[](#installation)

Just install it via composer:

```
composer require mathisburger/phpunit-stopwatch
```

Usage
=====

[](#usage)

```
class SomeTest extends \MathisBurger\PhpUnitStopwatch\StopwatchTestCase
{
    public function testSomething(): void
    {
        $this->runPerformanceTest(function () {
            sleep(2);
        });
        // Is successful
        $this->assertExecutionTimeBelow(3000);
    }
}
```

License
=======

[](#license)

This project is MIT licensed

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity2

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

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

1303d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2d132e9c4675b1382109d106a342224ed7dd443a359930b202108d007daeb1b?d=identicon)[MathisBurger](/maintainers/MathisBurger)

---

Top Contributors

[![MathisBurger](https://avatars.githubusercontent.com/u/57145815?v=4)](https://github.com/MathisBurger "MathisBurger (1 commits)")

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/mathisburger-phpunit-stopwatch/health.svg)

```
[![Health](https://phpackages.com/badges/mathisburger-phpunit-stopwatch/health.svg)](https://phpackages.com/packages/mathisburger-phpunit-stopwatch)
```

###  Alternatives

[timacdonald/log-fake

A drop in fake logger for testing with the Laravel framework.

4235.9M56](/packages/timacdonald-log-fake)[jasonmccreary/laravel-test-assertions

A set of helpful assertions when testing Laravel applications.

3513.9M32](/packages/jasonmccreary-laravel-test-assertions)[ergebnis/phpunit-slow-test-detector

Provides facilities for detecting slow tests in phpunit/phpunit.

1468.1M72](/packages/ergebnis-phpunit-slow-test-detector)[typo3/testing-framework

The TYPO3 testing framework provides base classes for unit, functional and acceptance testing.

675.0M775](/packages/typo3-testing-framework)[robiningelbrecht/phpunit-pretty-print

Prettify PHPUnit output

76460.0k15](/packages/robiningelbrecht-phpunit-pretty-print)[webmozarts/strict-phpunit

Enables type-safe comparisons of objects in PHPUnit

31252.7k5](/packages/webmozarts-strict-phpunit)

PHPackages © 2026

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