tourze / symfony-command-profile-bundle
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: ^8.1
- nesbot/carbon: ^2.72 || ^3
- psr/log: ^3|^2|^1
- symfony/config: ^6.4
- symfony/console: ^6.4
- symfony/dependency-injection: ^6.4
- symfony/event-dispatcher: ^6.4
- symfony/framework-bundle: ^6.4
- symfony/http-kernel: ^6.4
- symfony/service-contracts: ^3
- symfony/yaml: ^6.4 || ^7.1
Requires (Dev)
- phpstan/phpstan: ^2.1
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-04-25 19:17:36 UTC
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::COMMAND
andConsoleEvents::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.