• Модуль: perfmon
  • Путь к файлу: ~/bitrix/modules/perfmon/classes/general/keeper.php
  • Класс: CPerfomanceKeeper
  • Вызов: CPerfomanceKeeper::removeQueries
static function removeQueries(&$arQueryDebug, &$arIncludeDebug, $slow_sql_time, $preserveComponents = false)
{
	if (is_array($arQueryDebug))
	{
		foreach ($arQueryDebug as $i => $arQueryInfo)
		{
			if ($arQueryInfo["TIME"] < $slow_sql_time)
				unset($arQueryDebug[$i]);
		}
	}

	if (is_array($arIncludeDebug))
	{
		foreach ($arIncludeDebug as $i => $ar)
		{
			if (array_key_exists("REL_PATH", $ar) && is_array($ar["QUERIES"]))
			{
				foreach ($ar["QUERIES"] as $N => $arQueryInfo)
				{
					if ($arQueryInfo["TIME"] < $slow_sql_time)
						unset($arIncludeDebug[$i]["QUERIES"][$N]);
				}

				if (!$preserveComponents)
				{
					if (empty($arIncludeDebug[$i]["QUERIES"]))
					{
						unset($arIncludeDebug[$i]);
					}
				}
			}
			else
			{
				if (!$preserveComponents)
				{
					unset($arIncludeDebug[$i]);
				}
			}
		}
	}
}