Sfoglia il codice sorgente

[DoctrineBundle] added time information in the data collector

Fabien Potencier 15 anni fa
parent
commit
5470f0290e

+ 10 - 0
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}
      */