dawen/dic-service-benchmark-bundle
Composer 安装命令:
composer require dawen/dic-service-benchmark-bundle
包简介
Test the service instantiation time.
README 文档
README
This code will instantiate every registered service from the DIC and checks the time taken.
Installation
Require the dawen/dic-service-benchmark-bundle package in your composer.json and update your dependencies.
$ composer require dawen/dic-service-benchmark-bundle
This bundle contains no code for Runtime, or any services. You don't have to add it to your AppKernel.
Usage
Check out where you phpunit is installed and run (hint: disable coverage for this test):
bin/phpunit -c app vendor/dawen/dic-service-benchmark-bundle/Dawen/Bundle/DicServiceBenchmarkBundle/Tests/DicServiceBenchmarkTest.php
This will print out a list of services and their time elapsed when instantiating. This test will fail, if services will take longer than 50ms.
If you want to ignore service id's you can add in your phpunit.xml a global war that holds all service id's colon separated.
<php> <var name="dic-service-benchmark-ignore" value="web_profiler.controller.router,my-service"/> </php>
统计信息
- 总下载量: 6.81k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-12-22