{"id":20862364,"url":"https://github.com/nexusphp/tachycardia","last_synced_at":"2026-04-10T09:01:18.209Z","repository":{"id":53017312,"uuid":"349452441","full_name":"NexusPHP/tachycardia","owner":"NexusPHP","description":":runner: Detects slow running tests in your PHPUnit-driven test suites.","archived":false,"fork":false,"pushed_at":"2026-02-09T12:58:04.000Z","size":329,"stargazers_count":6,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"2.x","last_synced_at":"2026-03-07T21:05:07.872Z","etag":null,"topics":["php","phpunit","phpunit-extension","reports-slow","slow-tests","tachycardia"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NexusPHP.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":".github/CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-03-19T14:32:44.000Z","updated_at":"2026-02-09T12:58:08.000Z","dependencies_parsed_at":"2025-05-13T00:14:19.970Z","dependency_job_id":null,"html_url":"https://github.com/NexusPHP/tachycardia","commit_stats":{"total_commits":86,"total_committers":3,"mean_commits":"28.666666666666668","dds":0.05813953488372092,"last_synced_commit":"3b460c3a5dc395c4f66fbed827983babf7d63dc5"},"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/NexusPHP/tachycardia","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexusPHP%2Ftachycardia","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexusPHP%2Ftachycardia/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexusPHP%2Ftachycardia/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexusPHP%2Ftachycardia/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NexusPHP","download_url":"https://codeload.github.com/NexusPHP/tachycardia/tar.gz/refs/heads/2.x","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NexusPHP%2Ftachycardia/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31635969,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T07:40:12.752Z","status":"ssl_error","status_checked_at":"2026-04-10T07:40:11.664Z","response_time":98,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["php","phpunit","phpunit-extension","reports-slow","slow-tests","tachycardia"],"created_at":"2024-11-18T05:20:55.615Z","updated_at":"2026-04-10T09:01:18.188Z","avatar_url":"https://github.com/NexusPHP.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Nexus Tachycardia\n\n[![PHP version](https://img.shields.io/packagist/php-v/nexusphp/tachycardia)](https://php.net)\n![build](https://github.com/NexusPHP/tachycardia/actions/workflows/build.yml/badge.svg?branch=2.x)\n[![Coverage Status](https://coveralls.io/repos/github/NexusPHP/tachycardia/badge.svg?branch=2.x)](https://coveralls.io/github/NexusPHP/tachycardia?branch=2.x)\n[![PHPStan](https://img.shields.io/badge/PHPStan-max%20level-brightgreen)](phpstan.neon.dist)\n[![Latest Stable Version](https://poser.pugx.org/nexusphp/tachycardia/v)](//packagist.org/packages/nexusphp/tachycardia)\n[![License](https://img.shields.io/github/license/nexusphp/tachycardia)](LICENSE)\n[![Total Downloads](https://poser.pugx.org/nexusphp/tachycardia/downloads)](//packagist.org/packages/nexusphp/tachycardia)\n\n**Tachycardia** is a PHPUnit extension that detects and reports slow running tests and prints them\nright in your console. It can also optionally inline annotate the specific tests in the files\nduring pull requests.\n\n**NOTE:** Tachycardia will only detect the slow tests in your test suites but will offer no explanation\nas to why these identified are slow. You should use a dedicated profiler for these instead.\n\n```console\n$ vendor/bin/phpunit\nPHPUnit 10.5.5 by Sebastian Bergmann and contributors.\n\nRuntime:       PHP 8.3.1 with Xdebug 3.3.1\nConfiguration: /home/runner/work/tachycardia/tachycardia/phpunit.xml.dist\nRandom Seed:   1698146158\n\n................................................................. 65 / 96 ( 67%)\n...............................                                   96 / 96 (100%)\n\nNexus\\PHPUnit\\Tachycardia\\TachycardiaExtension identified this sole slow test:\n⚠  Took 1.3374s from 1.0000s limit to run Nexus\\\\PHPUnit\\\\Tachycardia\\\\Tests\\\\Renderer\\\\GithubRendererTest::testRendererWorksProperly\n\nSlow tests: Time: 00:00:01.710 (2.54%)\n\nTime: 00:58.737, Memory: 16.00 MB\n\nOK (96 tests, 265 assertions)\n\nGenerating code coverage report in Clover XML format ... done [00:00.391]\n\nGenerating code coverage report in HTML format ... done [00:01.930]\n```\n\n## Installation\n\nTachycardia should only be installed as a development-time dependency to aid in\nrunning your project's test suite. You can install using [Composer](https://getcomposer.org):\n\n    composer require --dev nexusphp/tachycardia\n\n## Configuration\n\nTachycardia supports these parameters:\n\n- **time-limit** - Time limit in seconds to be enforced for all tests. All tests exceeding\n    this amount will be considered as slow. ***Default: 1.00***\n- **report-count** - Number of slow tests to be displayed in the console report. This is ignored\n    on Github Actions report. ***Default: 10***\n- **precision** - Degree of precision of the decimals of the test's consumed time and allotted\n    time limit. ***Default: 4***\n- **format** - The format of the renderer for the console.\n- **ci-format** - The format of the renderer for the CI.\n\nRenderer formats for both the console and CI could be any of:\n\n| Format       | For Console? | For CI? | Remarks            |\n|--------------|:------------:|:-------:|--------------------|\n| **list**     | ✅︎           | ❌      | Default for console |\n| **table**    | ✅︎           | ❌      |                     |\n| **github**   | ✅︎           | ✅︎      | Default for CI      |\n| **gitlab**   | ✅︎           | ✅︎      |                     |\n| **teamcity** | ✅︎           | ✅︎      |                     |\n\nTo use the extension with its default configuration options, you can simply add the following\ninto your `phpunit.xml.dist` or `phpunit.xml` file.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cphpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"vendor/phpunit/phpunit/phpunit.xsd\"\n         bootstrap=\"vendor/autoload.php\"\n         cacheResultFile=\"build/.phpunit.cache/test-results\"\n         colors=\"true\"\n         beStrictAboutOutputDuringTests=\"true\"\n         beStrictAboutTodoAnnotatedTests=\"true\"\n         failOnRisky=\"true\"\n         failOnWarning=\"true\"\u003e\n\n    \u003c!-- Your other phpunit configurations here --\u003e\n\n    \u003cextensions\u003e\n        \u003cbootstrap class=\"Nexus\\PHPUnit\\Tachycardia\\TachycardiaExtension\" /\u003e\n    \u003c/extensions\u003e\n\u003c/phpunit\u003e\n```\n\nNow, run `vendor/bin/phpunit`. If there are test cases where the time consumed exceeds the configured\ntime limits, these will be displayed in the console after all tests have completed.\n\nIf you wish to customize one or more of the available options, you can just change the entry in your\n`phpunit.xml.dist` or `phpunit.xml` file.\n\n```xml\n\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n\u003cphpunit xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n         xsi:noNamespaceSchemaLocation=\"vendor/phpunit/phpunit/phpunit.xsd\"\n         bootstrap=\"vendor/autoload.php\"\n         cacheResultFile=\"build/.phpunit.cache/test-results\"\n         colors=\"true\"\n         beStrictAboutOutputDuringTests=\"true\"\n         beStrictAboutTodoAnnotatedTests=\"true\"\n         failOnRisky=\"true\"\n         failOnWarning=\"true\"\u003e\n\n    \u003c!-- Your other phpunit configurations here --\u003e\n\n    \u003cextensions\u003e\n        \u003cbootstrap class=\"Nexus\\PHPUnit\\Tachycardia\\TachycardiaExtension\"\u003e\n            \u003cparameter name=\"time-limit\" value=\"2.00\" /\u003e\n            \u003cparameter name=\"report-count\" value=\"30\" /\u003e\n            \u003cparameter name=\"precision\" value=\"2\" /\u003e\n            \u003cparameter name=\"format\" value=\"table\" /\u003e\n            \u003cparameter name=\"ci-format\" value=\"github\" /\u003e\n        \u003c/bootstrap\u003e\n    \u003c/extensions\u003e\n\u003c/phpunit\u003e\n```\n\n## Documentation\n\n- [Reporting Slow Tests](docs/enable_reporting.md)\n    - [Enable/disable console reporting using environment variable](docs/enable_reporting.md#enabledisable-console-reporting-using-environment-variable)\n    - [Enable/disable profiling in Github Actions](docs/enable_reporting.md#enabledisable-profiling-in-github-actions)\n- [Custom Time Limits](docs/custom_time_limits.md)\n    - [Setting custom time limits per test](docs/custom_time_limits.md#setting-custom-time-limits-per-test)\n    - [Setting custom time limits per class](docs/custom_time_limits.md#setting-custom-time-limits-per-class)\n    - [Disabling time limits per test or per class](docs/custom_time_limits.md#disabling-time-limits-per-test-or-per-class)\n    - [Using Attributes instead](docs/custom_time_limits.md#using-attributes-instead)\n- [Tabulating results instead of plain render](docs/tabulating_results.md)\n- [Rerunning slow tests to see if these are fast now](docs/rerunning_tests.md)\n\n## Upgrading\n\nUpgrading from v1.x to v2.x? See the [UPGRADING](docs/UPGRADING.md) Guide.\n\n## Contributing\n\nContributions are very much welcome. If you see an improvement or bug fix,\nopen a [PR](https://github.com/NexusPHP/tachycardia/pulls) now!\n\nRead more on the [Contributing to Nexus Tachycardia](.github/CONTRIBUTING.md).\n\n## Inspiration\n\nTachycardia was inspired from [`johnkary/phpunit-speedtrap`](https://github.com/johnkary/phpunit-speedtrap),\nbut injected with anabolic steroids.\n\nTachycardia is actually a [medical term](https://www.webmd.com/heart-disease/atrial-fibrillation/what-are-the-types-of-tachycardia)\nreferring to a heart rate that exceeds the normal resting rate in general of over 100 beats per minute.\n\n## License\n\nThis library is licensed under the [MIT License](LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexusphp%2Ftachycardia","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexusphp%2Ftachycardia","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexusphp%2Ftachycardia/lists"}