Skip to content

[HttpKernel] implement reset() in DumpDataCollector #24505

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
Oct 11, 2017

Conversation

xabbuh
Copy link
Member

@xabbuh xabbuh commented Oct 10, 2017

Q A
Branch? 3.4
Bug fix? yes
New feature? no
BC breaks? no
Deprecations? no
Tests pass? yes
Fixed tickets #24289
License MIT
Doc PR

@@ -164,6 +164,16 @@ public function collect(Request $request, Response $response, \Exception $except
}
}

public function reset()
{
$this->stopwatch->reset();
Copy link
Member

Choose a reason for hiding this comment

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

the data collector dealing with Stopwatch is not this one. So it should not be responsible for resetting (the DumpDataCollector uses the stopwatch to profile itself, it does not read from it).

This should be done in the TimeDataCollector instead

Copy link
Member Author

Choose a reason for hiding this comment

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

Inside dump() we deal with the Stopwatch in DumpDataCollector too: https://github.com/xabbuh/symfony/blob/dd53319950793f6bbed96e4a8ae764c48f64ebfc/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php#L68

But you are right about the TimeDataCollector. I have updated it too.

@nicolas-grekas
Copy link
Member

Thank you @xabbuh.

@nicolas-grekas nicolas-grekas merged commit cd602d6 into symfony:3.4 Oct 11, 2017
nicolas-grekas added a commit that referenced this pull request Oct 11, 2017
…abbuh)

This PR was merged into the 3.4 branch.

Discussion
----------

[HttpKernel] implement reset() in DumpDataCollector

| Q             | A
| ------------- | ---
| Branch?       | 3.4
| Bug fix?      | yes
| New feature?  | no
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #24289
| License       | MIT
| Doc PR        |

Commits
-------

cd602d6 implement reset() in DumpDataCollector
@xabbuh xabbuh deleted the pr-24289 branch October 11, 2017 08:33
This was referenced Oct 18, 2017
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.

4 participants