From 318a849b772964dd8718259465b228a39752b339 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 25 Jan 2018 16:10:51 -0800 Subject: [PATCH] Extra Debug Performance Markers added for e_module includes. --- class2.php | 2 ++ e107_handlers/db_debug_class.php | 7 +++++-- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/class2.php b/class2.php index 9c9c9d75d..1714e20ef 100644 --- a/class2.php +++ b/class2.php @@ -482,6 +482,7 @@ $sysprefs = new prefs; e107::getConfig()->load(); // extra load, required if mysql handler already called e107::getConfig() if(!e107::getConfig()->hasData()) { + // Core prefs error - admin log e107::getAdminLog()->log_event('CORE_LAN8', 'CORE_LAN7', E_LOG_WARNING); @@ -823,6 +824,7 @@ if(isset($pref['e_module_list']) && $pref['e_module_list']) { if (is_readable(e_PLUGIN."{$mod}/e_module.php")) { + $sql->db_Mark_Time('[e_module in '.$mod.']'); require_once(e_PLUGIN."{$mod}/e_module.php"); } } diff --git a/e107_handlers/db_debug_class.php b/e107_handlers/db_debug_class.php index 9730f7bbe..ffecc844a 100644 --- a/e107_handlers/db_debug_class.php +++ b/e107_handlers/db_debug_class.php @@ -100,10 +100,13 @@ class e107_db_debug { if (!strlen($sMarker)) { $sMarker = "Mark not set"; } - + + $srch = array('[',']'); + $repl = array("",""); + $this->aTimeMarks[$nMarks]=array( 'Index' => ($this->nTimeMarks), - 'What' => $sMarker, + 'What' => str_replace($srch,$repl,$sMarker), '%Time' => 0, '%DB Time' => 0, '%DB Count' => 0,