From fbfa0770fb7d8c3c0588adad927195ec07c9295a Mon Sep 17 00:00:00 2001 From: Repellent Date: Fri, 10 Apr 2026 21:41:31 +0500 Subject: [PATCH] =?UTF-8?q?=D0=92=20=D1=81=D0=B8=D1=81=D1=82=D0=B5=D0=BC?= =?UTF-8?q?=D0=BD=D1=8B=D1=85=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B9?= =?UTF-8?q?=D0=BA=D0=B0=D1=85-->=D0=94=D0=BE=D0=BF=D0=BE=D0=BB=D0=BD=D0=B8?= =?UTF-8?q?=D1=82=D0=B5=D0=BB=D1=8C=D0=BD=D1=8B=D0=B5=20=D0=BD=D0=B0=D1=81?= =?UTF-8?q?=D1=82=D1=80=D0=BE=D0=B9=D0=BA=D0=B8-->=D0=92=D1=8B=D0=B2=D0=BE?= =?UTF-8?q?=D0=B4=20=D0=BE=D0=B1=D1=89=D0=B5=D0=B9=20=D1=81=D1=82=D0=B0?= =?UTF-8?q?=D1=82=D0=B8=D1=81=D1=82=D0=B8=D0=BA=D0=B8=20=D0=BF=D1=83=D0=B1?= =?UTF-8?q?=D0=BB=D0=B8=D1=87=D0=BD=D0=BE=D0=B9=20=D1=87=D0=B0=D1=81=D1=82?= =?UTF-8?q?=D0=B8=20=20-->=20=D1=80=D0=B5=D0=B6=D0=B8=D0=BC=20dev=20=20-?= =?UTF-8?q?=20=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB=D0=B5=D0=BD=20=D0=B2?= =?UTF-8?q?=D1=8B=D0=B2=D0=BE=D0=B4=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B8=20?= =?UTF-8?q?=D1=82=D0=B5=D0=BA=D1=83=D1=89=D0=B5=D0=B3=D0=BE=20.tpl=20?= =?UTF-8?q?=D1=88=D0=B0=D0=B1=D0=BB=D0=BE=D0=BD=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- class/class.debug.php | 13 +++++++++++++ functions/func.common.php | 1 + 2 files changed, 14 insertions(+) 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 ----- ";