-
Notifications
You must be signed in to change notification settings - Fork 50
display children requests as nested in the profiler #181
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good. I like this. But I want to know that @dbu thinks as well.
Collector/Collector.php
Outdated
@@ -20,6 +20,11 @@ | |||
*/ | |||
class Collector extends DataCollector | |||
{ | |||
/** | |||
* @var Stack |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Stack|null
Collector/Collector.php
Outdated
* | ||
* @param Stack $stack | ||
*/ | ||
public function desactivateStack(Stack $stack) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Typo. deactivateStack
Resources/public/style/httplug.css
Outdated
* Stack | ||
*/ | ||
.httplug-stack>.httplug-stack { | ||
margin-left: 35px; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
4rem
instead.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is 4rem
a value you want as 35px is not enough? I changed it to 2.5em
which is 35px
on a 96dpi screen.
@Nyholm all yours comments have been fixed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
great, looks good to me!
While working on #109, I just discovered the refactoring I was doing allows to easily display children requests as nested in the profiler. To keep things small, I decided to do a separate PR which add a nice feature in the profiler and helps to fix #109.
This introduce the concept of active stack. When coming into the StackPlugin, the created stack is made active. Then the request go through every plugins to reach the ProfileClient. The ProfileClient deactivate the stack. Then other code execute, maybe an other request. Then when ProfileClient callbacks are executed, the stack is set as active until we reach StackPlugin callbacks where the stack is marked as inactive.
I also removed the null $stack checks as #133 is definitively solved (since #154).