mathisburger / phpunit-stopwatch
该包最新版本(v1.0.0)没有提供许可证信息。
用于测试 PHP 应用程序性能的 PHPUnit PHP 库
v1.0.0
2022-10-22 16:11 UTC
Requires
- php: ^7.4 || 8.0.*
- phpunit/phpunit: ^9.5.25
- symfony/stopwatch: ^v5.4.13
Requires (Dev)
- friendsofphp/php-cs-fixer: 3.4.*
This package is auto-updated.
Last update: 2024-09-22 20:23:24 UTC
README
phpunit-stopwatch
一个提供一些特性和测试用例的 PHP 库,用于对 PHPUnit 进行性能和内存测试项目信息
PHPUnit stopwatch 是一个简单的 PHP 库,使用 PHPUnit 和 stopwatch 来测试一些 PHP 函数的内存使用和执行时间。它提供了一个简单的测试用例,以及可以在自定义测试用例中实现的特性和测试用例。
安装
只需通过 composer 安装即可
composer require mathisburger/phpunit-stopwatch
使用方法
class SomeTest extends \MathisBurger\PhpUnitStopwatch\StopwatchTestCase { public function testSomething(): void { $this->runPerformanceTest(function () { sleep(2); }); // Is successful $this->assertExecutionTimeBelow(3000); } }
许可证
本项目采用 MIT 许可证