diff --git a/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php index b50386cb961c9..f9730b1485045 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/DumpDataCollector.php @@ -164,6 +164,16 @@ public function collect(Request $request, Response $response, \Exception $except } } + public function reset() + { + $this->stopwatch->reset(); + $this->data = array(); + $this->dataCount = 0; + $this->isCollected = false; + $this->clonesCount = 0; + $this->clonesIndex = 0; + } + public function serialize() { if ($this->clonesCount !== $this->clonesIndex) { diff --git a/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php b/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php index 6588304935d3d..e489d77598620 100644 --- a/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php +++ b/src/Symfony/Component/HttpKernel/DataCollector/TimeDataCollector.php @@ -14,6 +14,7 @@ use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\KernelInterface; +use Symfony\Component\Stopwatch\Stopwatch; /** * TimeDataCollector. @@ -25,7 +26,7 @@ class TimeDataCollector extends DataCollector implements LateDataCollectorInterf protected $kernel; protected $stopwatch; - public function __construct(KernelInterface $kernel = null, $stopwatch = null) + public function __construct(KernelInterface $kernel = null, Stopwatch $stopwatch = null) { $this->kernel = $kernel; $this->stopwatch = $stopwatch; @@ -55,6 +56,10 @@ public function collect(Request $request, Response $response, \Exception $except public function reset() { $this->data = array(); + + if (null !== $this->stopwatch) { + $this->stopwatch->reset(); + } } /**
Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.
Alternative Proxies: