tourze/symfony-command-profile-bundle
最新稳定版本:0.1.0
Composer 安装命令:
composer require tourze/symfony-command-profile-bundle
包简介
A Symfony bundle that profiles and outputs the runtime of console commands
README 文档
README
A Symfony bundle that profiles and outputs the runtime of console commands. It helps you analyze the performance of your custom or built-in Symfony console commands by displaying the execution time after each run.
Features
- Automatically tracks and displays the execution time for every Symfony console command
- No code modification needed for your commands
- Lightweight and easy to integrate
Installation
Make sure your project uses Symfony 6.4+ and PHP 8.1+.
Install via Composer:
composer require tourze/symfony-command-profile-bundle
Quick Start
- Register the bundle in your Symfony application's
config/bundles.php(if Flex does not auto-register):
return [ // ... Tourze\CommandProfileBundle\CommandProfileBundle::class => ['all' => true], ];
- Run any Symfony console command:
php bin/console your:command
At the end of the command output, you will see a line like:
RunTime: 0.123456
No additional configuration is required.
Advanced
- The bundle uses event subscribers to hook into
ConsoleEvents::COMMANDandConsoleEvents::TERMINATE. - Uses nesbot/carbon for precise time calculation.
Contributing
Please see CONTRIBUTING.md for details.
License
This bundle is open-sourced software licensed under the MIT license.
Changelog
See CHANGELOG.md for version history and upgrade notes.
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-04-17