Download the PHP package rcsofttech/console-profiler-bundle without Composer
On this page you can find all versions of the php package rcsofttech/console-profiler-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rcsofttech/console-profiler-bundle
More information about rcsofttech/console-profiler-bundle
Files in rcsofttech/console-profiler-bundle
Package console-profiler-bundle
Short Description A live, non-blocking TUI profiler dashboard for Symfony console commands. Displays real-time memory, duration, and SQL query metrics.
License MIT
Informations about the package console-profiler-bundle
Console Profiler Bundle
If you've ever watched a long-running Symfony console command crawl and wondered, "Is this thing leaking memory? Am I hammering the database with N+1 queries right now?" — this bundle is for you.
The standard Symfony Profiler is amazing for HTTP requests, but it doesn't help you much when a queue worker is eating up RAM in the background. The Console Profiler Bundle hooks right into your terminal to give you a live, premium TUI dashboard while your commands are actually running.
Features
- Live, auto-refreshing TUI dashboard pinned to the top of your terminal
- Memory usage, peak memory, and growth rate with color-coded bars
- Real-time trend indicators (
↑↓→) for memory and SQL - CPU user/system time tracking via
getrusage() - Automatic SQL query counting via Doctrine DBAL 4 Middleware
- JSON profile export for CI pipeline regression testing
- Exit code stamping on command completion
- Zero configuration required — works out of the box
- Graceful degradation without
ext-pcntl(no auto-refresh)
Installation
Pop it into your dev dependencies via Composer:
Note: You'll need PHP 8.4+, Symfony 8.0+, and the ext-pcntl extension
(which you probably already have on Mac/Linux) to get the smooth async UI
updates.
Configuration (Optional)
You don't have to configure anything, it works right out of the box. But if you
want to tweak things, create config/packages/console_profiler.yaml:
Practical Examples
1. Debugging a leaky queue worker
Run your worker normally:
Look at the Memory row in the profiler. You'll see a +X MB/s indicator
showing exactly how fast memory is growing. If it holds steady into the yellow
or red, you know you've got a leak to fix.
2. Guarding against N+1 queries in CI
Set your profile_dump_path in console_profiler.yaml. Then, in your CI run:
The JSON dump tracks memory, CPU times, SQL counts, and more.
JSON Profile Schema
When profile_dump_path is configured, the following JSON is written
on command completion:
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a feature branch (
git checkout -b feature/my-feature) - Ensure tests pass:
vendor/bin/phpunit - Ensure static analysis passes:
vendor/bin/phpstan analyze - Submit a pull request
License
MIT License.
All versions of console-profiler-bundle with dependencies
symfony/config Version ^8.0
symfony/console Version ^8.0
symfony/dependency-injection Version ^8.0
symfony/event-dispatcher Version ^8.0
symfony/http-kernel Version ^8.0