Please sign in to comment.
feature #29006 [Messenger] make TraceableMiddleware decorate a StackI…
…nterface instead of each middleware to free the callstack from noisy frames (nicolas-grekas) This PR was merged into the 4.2-dev branch. Discussion ---------- [Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames | Q | A | ------------- | --- | Branch? | 4.2 | Bug fix? | no | New feature? | no | BC breaks? | yes | Deprecations? | no | Tests pass? | yes | Fixed tickets | - | License | MIT | Doc PR | - Right now, `TraceableMiddleware` works as a middleware decorator for the "handle" method. It means that *each middleware* frame in the call stack is wrapped between two noisy extra frames. This is something we can remove by decorating the StackInterface instead: let's just stop/start events when the next middleware is fetched. Thanks to this, only one frame *per bus* is added to measure middleware timings. Commits ------- 73c8c23 [Messenger] make TraceableMiddleware decorate a StackInterface instead of each middleware to free the callstack from noisy frames
- Loading branch information...
Showing with 63 additions and 112 deletions.
- +5 −1 src/Symfony/Bundle/FrameworkBundle/DependencyInjection/FrameworkExtension.php
- +6 −4 src/Symfony/Bundle/FrameworkBundle/Resources/config/messenger.xml
- +4 −22 src/Symfony/Component/Messenger/DependencyInjection/MessengerPass.php
- +27 −31 src/Symfony/Component/Messenger/Middleware/TraceableMiddleware.php
- +1 −35 src/Symfony/Component/Messenger/Tests/DependencyInjection/MessengerPassTest.php
- +20 −19 src/Symfony/Component/Messenger/Tests/Middleware/TraceableMiddlewareTest.php