Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[Messenger][Profiler] Show dispatch caller #27343

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

Merged
merged 1 commit into from
May 31, 2018
Merged

[Messenger][Profiler] Show dispatch caller #27343

merged 1 commit into from
May 31, 2018

Conversation

ogizanagi
Copy link
Contributor

@ogizanagi ogizanagi commented May 22, 2018

Q A
Branch? 4.2
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets N/A
License MIT
Doc PR N/A

Just something I missed on my checklist in the first PR:

mai-22-2018 19-51-52

@sroze
Copy link
Contributor

sroze commented May 22, 2018

Very nice. Though I think it should be on master as it's a new feature :)

@ostrolucky
Copy link
Contributor

This looks nice 😍 can the same be be done for regular dispatcher?

@ogizanagi
Copy link
Contributor Author

ogizanagi commented May 23, 2018

@ostrolucky : Theoretically yes of course, but in practice there are usually (perhaps not that much) more regular events dispatched than messages, so this may have a significant performances impact on dev. I remember trying to do the same for the translations panel but the perfs decrease was too much important for the benefits. We could give a try anyway.

@sroze : Could still go to 4.1 to me as it completes the first PR improving the panel and changes are almost only additions, small and easy to test (and code is extracted from the validator panel). But of course you're right and there is no urge. So, your call :)

@nicolas-grekas nicolas-grekas added this to the 4.1 milestone May 24, 2018
Copy link
Member

@chalasr chalasr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 to tweak the existing panel for 4.1

@fabpot fabpot modified the milestones: 4.1, next May 28, 2018
@fabpot fabpot changed the base branch from 4.1 to master May 28, 2018 05:53
Copy link
Contributor

@sroze sroze left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise, 👌

@@ -29,6 +29,34 @@ public function __construct(MessageBusInterface $decoratedBus)
*/
public function dispatch($message)
{
$trace = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS, 7);

$file = $trace[0]['file'];
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you isolate that bit (with the for and the compact) in its own method?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@sroze
Copy link
Contributor

sroze commented May 31, 2018

Thank you @ogizanagi.

@sroze sroze merged commit 1c2f43f into symfony:master May 31, 2018
sroze added a commit that referenced this pull request May 31, 2018
This PR was merged into the 4.2-dev branch.

Discussion
----------

[Messenger][Profiler] Show dispatch caller

| Q             | A
| ------------- | ---
| Branch?       | 4.2 <!-- see below -->
| Bug fix?      | no
| New feature?  | yes <!-- don't forget to update src/**/CHANGELOG.md files -->
| BC breaks?    | no     <!-- see https://symfony.com/bc -->
| Deprecations? | no <!-- don't forget to update UPGRADE-*.md and src/**/CHANGELOG.md files -->
| Tests pass?   | yes <!-- please add some, will be required by reviewers -->
| Fixed tickets | N/A  <!-- #-prefixed issue number(s), if any -->
| License       | MIT
| Doc PR        | N/A

Just something I missed on my checklist in the first PR:

![mai-22-2018 19-51-52](https://user-images.githubusercontent.com/2211145/40380514-a0ba3326-5df9-11e8-9dd6-82a42dc7ccae.gif)

Commits
-------

1c2f43f [Messenger][Profiler] Show dispatch caller
@ogizanagi ogizanagi deleted the messenger/profiler_dispatch_caller_source branch May 31, 2018 07:47
@nicolas-grekas nicolas-grekas modified the milestones: next, 4.2 Nov 1, 2018
This was referenced Nov 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants