mirror of
https://github.com/Combodo/iTop.git
synced 2026-02-13 07:24:13 +01:00
Merge remote-tracking branch 'origin/support/3.1' into develop
This commit is contained in:
@@ -1069,10 +1069,10 @@ class Config
|
|||||||
'source_of_value' => '',
|
'source_of_value' => '',
|
||||||
'show_in_conf_sample' => false,
|
'show_in_conf_sample' => false,
|
||||||
],
|
],
|
||||||
'log_kpi_report_to_extensions_only' => [
|
'log_kpi_generate_legacy_report' => [
|
||||||
'type' => 'bool',
|
'type' => 'bool',
|
||||||
'description' => 'Report only the KPI logging extensions',
|
'description' => 'Generate the legacy KPI report (kpi.html)',
|
||||||
'default' => false,
|
'default' => true,
|
||||||
'value' => '',
|
'value' => '',
|
||||||
'source_of_value' => '',
|
'source_of_value' => '',
|
||||||
'show_in_conf_sample' => false,
|
'show_in_conf_sample' => false,
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ class ExecutionKPI
|
|||||||
static protected $m_bEnabled_Memory = false;
|
static protected $m_bEnabled_Memory = false;
|
||||||
static protected $m_bBlameCaller = false;
|
static protected $m_bBlameCaller = false;
|
||||||
static protected $m_sAllowedUser = '*';
|
static protected $m_sAllowedUser = '*';
|
||||||
static protected $m_bReportExtensionsOnly = false;
|
static protected $m_bGenerateLegacyReport = true;
|
||||||
static protected $m_fSlowQueries = 0;
|
static protected $m_fSlowQueries = 0;
|
||||||
|
|
||||||
static protected $m_aStats = []; // Recurrent operations
|
static protected $m_aStats = []; // Recurrent operations
|
||||||
@@ -75,9 +75,9 @@ class ExecutionKPI
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function SetReportExtensionsOnly($bReportExtensionsOnly)
|
static public function SetGenerateLegacyReport($bReportExtensionsOnly)
|
||||||
{
|
{
|
||||||
self::$m_bReportExtensionsOnly = $bReportExtensionsOnly;
|
self::$m_bGenerateLegacyReport = $bReportExtensionsOnly;
|
||||||
}
|
}
|
||||||
|
|
||||||
static public function SetSlowQueries($fSlowQueries)
|
static public function SetSlowQueries($fSlowQueries)
|
||||||
@@ -134,7 +134,7 @@ class ExecutionKPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (self::$m_bReportExtensionsOnly) {
|
if (!self::$m_bGenerateLegacyReport) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -397,7 +397,7 @@ class ExecutionKPI
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!is_null($aNewEntry) && !self::$m_bReportExtensionsOnly)
|
if (!is_null($aNewEntry) && self::$m_bGenerateLegacyReport)
|
||||||
{
|
{
|
||||||
self::$m_aExecData[] = $aNewEntry;
|
self::$m_aExecData[] = $aNewEntry;
|
||||||
}
|
}
|
||||||
@@ -427,7 +427,7 @@ class ExecutionKPI
|
|||||||
$fStopped = MyHelpers::getmicrotime();
|
$fStopped = MyHelpers::getmicrotime();
|
||||||
$fDuration = $fStopped - $this->m_fStarted;
|
$fDuration = $fStopped - $this->m_fStarted;
|
||||||
$aCallstack = [];
|
$aCallstack = [];
|
||||||
if (!self::$m_bReportExtensionsOnly) {
|
if (self::$m_bGenerateLegacyReport) {
|
||||||
if (self::$m_bBlameCaller) {
|
if (self::$m_bBlameCaller) {
|
||||||
$aCallstack = MyHelpers::get_callstack(1);
|
$aCallstack = MyHelpers::get_callstack(1);
|
||||||
self::$m_aStats[$sOperation][$sArguments][] = [
|
self::$m_aStats[$sOperation][$sArguments][] = [
|
||||||
|
|||||||
@@ -6377,7 +6377,7 @@ abstract class MetaModel
|
|||||||
ExecutionKPI::EnableDuration(self::$m_oConfig->Get('log_kpi_duration'));
|
ExecutionKPI::EnableDuration(self::$m_oConfig->Get('log_kpi_duration'));
|
||||||
ExecutionKPI::EnableMemory(self::$m_oConfig->Get('log_kpi_memory'));
|
ExecutionKPI::EnableMemory(self::$m_oConfig->Get('log_kpi_memory'));
|
||||||
ExecutionKPI::SetAllowedUser(self::$m_oConfig->Get('log_kpi_user_id'));
|
ExecutionKPI::SetAllowedUser(self::$m_oConfig->Get('log_kpi_user_id'));
|
||||||
ExecutionKPI::SetReportExtensionsOnly(self::$m_oConfig->Get('log_kpi_report_to_extensions_only'));
|
ExecutionKPI::SetGenerateLegacyReport(self::$m_oConfig->Get('log_kpi_generate_legacy_report'));
|
||||||
ExecutionKPI::SetSlowQueries(self::$m_oConfig->Get('log_kpi_slow_queries'));
|
ExecutionKPI::SetSlowQueries(self::$m_oConfig->Get('log_kpi_slow_queries'));
|
||||||
|
|
||||||
self::$m_bSkipCheckToWrite = self::$m_oConfig->Get('skip_check_to_write');
|
self::$m_bSkipCheckToWrite = self::$m_oConfig->Get('skip_check_to_write');
|
||||||
|
|||||||
Reference in New Issue
Block a user