From 5470f0290e98d83f1fb7d68869a8717832b49c21 Mon Sep 17 00:00:00 2001 From: Fabien Potencier Date: Mon, 30 Aug 2010 15:47:32 +0200 Subject: [PATCH] [DoctrineBundle] added time information in the data collector --- .../DataCollector/DoctrineDataCollector.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php b/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php index 8ff36ff17a..9a6e79611e 100644 --- a/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php +++ b/src/Symfony/Bundle/DoctrineBundle/DataCollector/DoctrineDataCollector.php @@ -50,6 +50,16 @@ class DoctrineDataCollector extends DataCollector return $this->data['queries']; } + public function getTime() + { + $time = 0; + foreach ($this->data['queries'] as $query) { + $time += $query['executionMS']; + } + + return $time; + } + /** * {@inheritdoc} */