-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Odd data in performance tab of the profiler #49677
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Wrapping symfony/src/Symfony/Component/EventDispatcher/Debug/WrappedListener.php Lines 115 to 119 in c918829
try /finally seems to produce the expected output.
try {
($this->optimizedListener ?? $this->listener)($event, $eventName, $dispatcher);
} finally {
if ($e->isStarted()) {
$e->stop();
}
} |
@MatTheCat can you send a PR ? |
I also found symfony/src/Symfony/Component/HttpKernel/Controller/TraceableControllerResolver.php Lines 36 to 40 in 0362350
symfony/src/Symfony/Component/HttpKernel/Controller/TraceableArgumentResolver.php Lines 36 to 40 in 0362350
|
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Stop stopwatch events in case of exception | Q | A | ------------- | --- | Branch? | 5.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #49677 | License | MIT | Doc PR | N/A Stopwatch events need to be stopped even if an exception occurred, else they will appear to span across the whole request timeline. The following screenshots were taken with `RouterListener` throwing in debug mode following a [`NoConfigurationException`](https://github.com/symfony/symfony/blob/0362350a720e38df55531ab0cf726a082d3d34d4/src/Symfony/Component/Routing/Exception/NoConfigurationException.php): <details> <summary>Before</summary> <img src="https://user-images.githubusercontent.com/243674/224777379-1209dfde-8086-49e3-af56-147ceda3e6c9.png" alt=""> </details> <details> <summary>After</summary> <img src="https://user-images.githubusercontent.com/1898254/225371948-a21acf87-203c-49f9-b73a-4947e9a5092a.png" alt=""> </details> Commits ------- beca17a Stop stopwatch events in case of exception
Symfony version(s) affected
Description
This profile is strange (RouterListener should span that much). Maybe it's because the listener is throwing?
How to reproduce
symfony new test-profiler --version=5.4 cd test-profiler/ composer req profiler symfony serve
Go to https://127.0.0.1:8000/ and open the "Performance tab" in the Profiler Toolbar.
Possible Solution
No response
Additional Context
No response
The text was updated successfully, but these errors were encountered: