usernam3/phpunit_stopwatch_annotations
Composer 安装命令:
composer require usernam3/phpunit_stopwatch_annotations
包简介
phpunit test case with support for execution time and memory usage assertion in annotations
关键字:
README 文档
README
PHPUnit stopwatch annotations is a PHPUnit test case with support for execution time and memory usage assertion in annotations. It uses symfony/Stopwatch component for tracking time and memory usage of tests.
Installation
Via Composer
composer require --dev "usernam3/phpunit_stopwatch_annotations:dev-master"
Usage
To add support of @executionTime and @memoryUsage annotations you need to extend your test case class from \StopwatchAnnotations\TestCase.
@executionTime value is measured in milliseconds @memoryUsage in bytes.
Example of test case:
class ExampleTest extends \StopwatchAnnotations\TestCase { /** * @test * @executionTime 1999 */ public function executionTimeFailed() { sleep(2); } /** * @test * @memoryUsage 2000000 */ public function memoryUsageFailed() { } }
统计信息
- 总下载量: 543
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-02