File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change @@ -619,6 +619,36 @@ Using Events And Handling Signals
619619When a command is running, many events are dispatched, one of them allows to
620620react to signals, read more in :doc: `this section </components/console/events >`.
621621
622+ Profiling Commands
623+ ------------------
624+
625+ When debug mode and the profiler are enabled, you can run a command with the
626+ ``--profile `` option. Symfony will then collect data about the command execution.
627+ When the execution is over, the profile is accessible through the web page of
628+ the :doc: `Symfony Profiler </profiler >`.
629+
630+ .. tip ::
631+
632+ If you run the command in verbose mode (``-v ``), Symfony will display
633+ in the output a clickable link to the command profile (if your terminal
634+ supports links). If you run it in debug verbosity (``-vvv ``) you'll
635+ also see the time and memory consumed by the command.
636+
637+ .. code-block :: terminal
638+
639+ $ php bin/console --profile -v app:my-command
640+ ...
641+
642+ [OK] Command successful !
643+
644+ See profile f4ef63 # <- this is a clickable link if your terminal supports it
645+
646+ ```
647+
648+ .. versionadded :: 6.4
649+
650+ The ``--profile `` option was introduced in Symfony 6.4.
651+
622652Learn More
623653----------
624654
You can’t perform that action at this time.
0 commit comments