/** * Gets menu tab for the Debugbar * @author Paulius Petronis <*****@*****.**> * @return string */ public function getTab() { if (!$this->_profiler) { return 'No profiler'; } $time = 0; foreach ($this->_profiler as $event) { $time += $event->getElapsedSecs(); } $html = "Query: " . $this->_profiler->count() . ' in ' . round($time * 1000, 2) . ' ms'; return $html; }
/** * Creates a doctrine profiler. */ public function __construct() { parent::__construct(); $this->dataDirectory = M3_Util_Settings::getDataDirectory() . '/doctrine-profiler'; $this->md5FilesCreated = array(); }