-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[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
Conversation
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(); |
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.
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
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.
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.
Thank you @xabbuh. |
…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