PHPackages                             nexusphp/tachycardia - 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. nexusphp/tachycardia

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

nexusphp/tachycardia
====================

Detects slow running tests in your PHPUnit-driven test suites.

v2.4.2(9mo ago)61.2M↓13.3%1[1 issues](https://github.com/NexusPHP/tachycardia/issues)[2 PRs](https://github.com/NexusPHP/tachycardia/pulls)20MITPHPPHP ^8.1CI passing

Since Mar 21Pushed 3mo ago3 watchersCompare

[ Source](https://github.com/NexusPHP/tachycardia)[ Packagist](https://packagist.org/packages/nexusphp/tachycardia)[ RSS](/packages/nexusphp-tachycardia/feed)WikiDiscussions 2.x Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (22)Used By (20)

Nexus Tachycardia
=================

[](#nexus-tachycardia)

[![PHP version](https://camo.githubusercontent.com/cf10514afaa05696af064321608b4782ecd3e3380a71038b4063c736581387eb/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6e657875737068702f7461636879636172646961)](https://php.net)[![build](https://github.com/NexusPHP/tachycardia/actions/workflows/build.yml/badge.svg?branch=2.x)](https://github.com/NexusPHP/tachycardia/actions/workflows/build.yml/badge.svg?branch=2.x)[![Coverage Status](https://camo.githubusercontent.com/024a1540ce79fb908c4b2d8d1a251982504534332298515e3458d85657c277c4/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4e657875735048502f74616368796361726469612f62616467652e7376673f6272616e63683d322e78)](https://coveralls.io/github/NexusPHP/tachycardia?branch=2.x)[![PHPStan](https://camo.githubusercontent.com/8e9b3549f0d6ec7e6099edb2839f0eacef08777ced80ea3160dd7311fff08ace/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048505374616e2d6d61782532306c6576656c2d627269676874677265656e)](phpstan.neon.dist)[![Latest Stable Version](https://camo.githubusercontent.com/af8bbbc924817f090c885307d96289b4e9f94cee83e79631e774141e719892a9/68747470733a2f2f706f7365722e707567782e6f72672f6e657875737068702f74616368796361726469612f76)](//packagist.org/packages/nexusphp/tachycardia)[![License](https://camo.githubusercontent.com/692fa8f15950c80365386db5999e53925a986333d4f089a67dbb8e698ffd147c/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6e657875737068702f7461636879636172646961)](LICENSE)[![Total Downloads](https://camo.githubusercontent.com/fb8736513f1e5c3559b7814a8498d2f4dc3d31e7b2425a7a9dd814284cb3ddf2/68747470733a2f2f706f7365722e707567782e6f72672f6e657875737068702f74616368796361726469612f646f776e6c6f616473)](//packagist.org/packages/nexusphp/tachycardia)

**Tachycardia** is a PHPUnit extension that detects and reports slow running tests and prints them right in your console. It can also optionally inline annotate the specific tests in the files during pull requests.

**NOTE:** Tachycardia will only detect the slow tests in your test suites but will offer no explanation as to why these identified are slow. You should use a dedicated profiler for these instead.

```
$ vendor/bin/phpunit
PHPUnit 10.5.5 by Sebastian Bergmann and contributors.

Runtime:       PHP 8.3.1 with Xdebug 3.3.1
Configuration: /home/runner/work/tachycardia/tachycardia/phpunit.xml.dist
Random Seed:   1698146158

................................................................. 65 / 96 ( 67%)
...............................                                   96 / 96 (100%)

Nexus\PHPUnit\Tachycardia\TachycardiaExtension identified this sole slow test:
⚠  Took 1.3374s from 1.0000s limit to run Nexus\\PHPUnit\\Tachycardia\\Tests\\Renderer\\GithubRendererTest::testRendererWorksProperly

Slow tests: Time: 00:00:01.710 (2.54%)

Time: 00:58.737, Memory: 16.00 MB

OK (96 tests, 265 assertions)

Generating code coverage report in Clover XML format ... done [00:00.391]

Generating code coverage report in HTML format ... done [00:01.930]
```

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

[](#installation)

Tachycardia should only be installed as a development-time dependency to aid in running your project's test suite. You can install using [Composer](https://getcomposer.org):

```
composer require --dev nexusphp/tachycardia

```

Configuration
-------------

[](#configuration)

Tachycardia supports these parameters:

- **time-limit** - Time limit in seconds to be enforced for all tests. All tests exceeding this amount will be considered as slow. ***Default: 1.00***
- **report-count** - Number of slow tests to be displayed in the console report. This is ignored on Github Actions report. ***Default: 10***
- **precision** - Degree of precision of the decimals of the test's consumed time and allotted time limit. ***Default: 4***
- **format** - The format of the renderer for the console.
- **ci-format** - The format of the renderer for the CI.

Renderer formats for both the console and CI could be any of:

FormatFor Console?For CI?Remarks**list**✅︎❌Default for console**table**✅︎❌**github**✅︎✅︎Default for CI**gitlab**✅︎✅︎**teamcity**✅︎✅︎To use the extension with its default configuration options, you can simply add the following into your `phpunit.xml.dist` or `phpunit.xml` file.

```

```

Now, run `vendor/bin/phpunit`. If there are test cases where the time consumed exceeds the configured time limits, these will be displayed in the console after all tests have completed.

If you wish to customize one or more of the available options, you can just change the entry in your `phpunit.xml.dist` or `phpunit.xml` file.

```

```

Documentation
-------------

[](#documentation)

- [Reporting Slow Tests](docs/enable_reporting.md)
    - [Enable/disable console reporting using environment variable](docs/enable_reporting.md#enabledisable-console-reporting-using-environment-variable)
    - [Enable/disable profiling in Github Actions](docs/enable_reporting.md#enabledisable-profiling-in-github-actions)
- [Custom Time Limits](docs/custom_time_limits.md)
    - [Setting custom time limits per test](docs/custom_time_limits.md#setting-custom-time-limits-per-test)
    - [Setting custom time limits per class](docs/custom_time_limits.md#setting-custom-time-limits-per-class)
    - [Disabling time limits per test or per class](docs/custom_time_limits.md#disabling-time-limits-per-test-or-per-class)
    - [Using Attributes instead](docs/custom_time_limits.md#using-attributes-instead)
- [Tabulating results instead of plain render](docs/tabulating_results.md)
- [Rerunning slow tests to see if these are fast now](docs/rerunning_tests.md)

Upgrading
---------

[](#upgrading)

Upgrading from v1.x to v2.x? See the [UPGRADING](docs/UPGRADING.md) Guide.

Contributing
------------

[](#contributing)

Contributions are very much welcome. If you see an improvement or bug fix, open a [PR](https://github.com/NexusPHP/tachycardia/pulls) now!

Read more on the [Contributing to Nexus Tachycardia](.github/CONTRIBUTING.md).

Inspiration
-----------

[](#inspiration)

Tachycardia was inspired from [`johnkary/phpunit-speedtrap`](https://github.com/johnkary/phpunit-speedtrap), but injected with anabolic steroids.

Tachycardia is actually a [medical term](https://www.webmd.com/heart-disease/atrial-fibrillation/what-are-the-types-of-tachycardia)referring to a heart rate that exceeds the normal resting rate in general of over 100 beats per minute.

License
-------

[](#license)

This library is licensed under the [MIT License](LICENSE).

###  Health Score

55

—

FairBetter than 98% of packages

Maintenance66

Regular maintenance activity

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity71

Established project with proven stability

 Bus Factor1

Top contributor holds 97.6% 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

Every ~94 days

Recently: every ~184 days

Total

20

Last Release

98d ago

Major Versions

v1.5.0 → v2.0.02023-10-24

PHP version history (5 changes)v1.0.0PHP ^7.3 || ^8.0

v1.4.0PHP ^7.4 || ^8.0

v1.5.0PHP ^8.0

v2.0.0PHP ^8.1

2.x-devPHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/808229fdb6d93fadff56999d343e4235394321e88376a73b2cf41b2192c62b34?d=identicon)[paulbalandan](/maintainers/paulbalandan)

---

Top Contributors

[![paulbalandan](https://avatars.githubusercontent.com/u/51850998?v=4)](https://github.com/paulbalandan "paulbalandan (162 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")

---

Tags

phpphpunitphpunit-extensionreports-slowslow-teststachycardia

###  Code Quality

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/nexusphp-tachycardia/health.svg)

```
[![Health](https://phpackages.com/badges/nexusphp-tachycardia/health.svg)](https://phpackages.com/packages/nexusphp-tachycardia)
```

###  Alternatives

[orchestra/testbench

Laravel Testing Helper for Packages Development

2.2k39.1M32.1k](/packages/orchestra-testbench)[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)

PHPackages © 2026

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