diff --git a/class/class.debug.php b/class/class.debug.php index 6f24c4f..886c8a1 100644 --- a/class/class.debug.php +++ b/class/class.debug.php @@ -890,6 +890,19 @@ $stat = Debug::formatSize(memory_get_peak_usage()); break; + case 'template': + $mod = $_REQUEST['module'] ?? 'index'; + $act = $_REQUEST['action'] ?? 'main'; + $stat = "[{$mod}] -> {$act}.tpl"; + + if (isset($AVE_Template)) { + $real_tpl = $AVE_Template->template_resource ?? $AVE_Template->_current_file ?? null; + if ($real_tpl) { + $stat = basename($real_tpl); + } + } + break; + case 'sqlcount': $stat = $AVE_DB->DBProfilesGet('count'); break; diff --git a/functions/func.common.php b/functions/func.common.php index 339e479..3c19d1b 100644 --- a/functions/func.common.php +++ b/functions/func.common.php @@ -1316,6 +1316,7 @@ function get_settings($field = '') $dev_output .= "\r\n" . "------ Time generation: ".Debug::getStatistic('time')." sec ----- "; $dev_output .= "\r\n" . "------ Memory usage: ".Debug::getStatistic('memory')." ----- "; $dev_output .= "\r\n" . "------ Memory peak usage: ".Debug::getStatistic('peak')." ----- "; + $dev_output .= "\r\n" . "------ Template: ".Debug::getStatistic('template')." ----- "; if (defined('SQL_PROFILING') && SQL_PROFILING) $dev_output .= "\r\n" . "------ SQL Queries: ".$AVE_DB->DBProfilesGet('count')." for ".$AVE_DB->DBProfilesGet('time')." sec ----- ";