From 2c4cad4dac34b7c1c12da41e6f64b69d0b0a5a89 Mon Sep 17 00:00:00 2001 From: Eric Espie Date: Wed, 19 Jul 2023 10:37:41 +0200 Subject: [PATCH] =?UTF-8?q?N=C2=B06436=20-=20Integrate=20Performance=20Aud?= =?UTF-8?q?it=20pre=20requisite=20in=20iTop=20Pro=202.7.9=20(avoid=20unnec?= =?UTF-8?q?essary=20calls)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- core/kpi.class.inc.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/core/kpi.class.inc.php b/core/kpi.class.inc.php index 57f167d87..592f2b276 100644 --- a/core/kpi.class.inc.php +++ b/core/kpi.class.inc.php @@ -339,6 +339,10 @@ class ExecutionKPI { global $fItopStarted; + if (!self::IsEnabled()) { + return; + } + $aNewEntry = null; $fStarted = $this->m_fStarted; @@ -402,6 +406,9 @@ class ExecutionKPI public function ComputeStatsForExtension($object, $sMethod) { + if (!self::IsEnabled()) { + return; + } $sSignature = ModuleService::GetInstance()->GetModuleMethodSignature($object, $sMethod); if (utils::StartsWith($sSignature, '[')) { $this->ComputeStats('Extension', $sSignature); @@ -410,6 +417,10 @@ class ExecutionKPI public function ComputeStats($sOperation, $sArguments) { + if (!self::IsEnabled()) { + return; + } + if (self::$m_bEnabled_Duration) { $fStopped = MyHelpers::getmicrotime();