Skip to content

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

Merged
merged 1 commit into from
Jul 10, 2017
Merged

display children requests as nested in the profiler #181

merged 1 commit into from
Jul 10, 2017

Conversation

fbourigault
Copy link
Contributor

Q A
Bug fix? no
New feature? yes
BC breaks? no
Deprecations? no
Related tickets partially #109
Documentation update screenshots?
License MIT

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).

Copy link
Member

@Nyholm Nyholm left a 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.

@@ -20,6 +20,11 @@
*/
class Collector extends DataCollector
{
/**
* @var Stack
Copy link
Member

Choose a reason for hiding this comment

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

Stack|null

*
* @param Stack $stack
*/
public function desactivateStack(Stack $stack)
Copy link
Member

Choose a reason for hiding this comment

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

Typo. deactivateStack

* Stack
*/
.httplug-stack>.httplug-stack {
margin-left: 35px;
Copy link
Member

Choose a reason for hiding this comment

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

4rem instead.

Copy link
Contributor Author

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.

@fbourigault fbourigault requested a review from dbu July 6, 2017 15:03
@fbourigault
Copy link
Contributor Author

@Nyholm all yours comments have been fixed.
I also set minimum phpunit/php-token-stream version to 1.1.8 as we use the finally keyword.

Copy link
Collaborator

@dbu dbu left a 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!

@Nyholm Nyholm merged commit 3a03832 into php-http:master Jul 10, 2017
@fbourigault fbourigault deleted the nested-profiling branch July 10, 2017 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Show plugins created without the Symfony config
3 participants