• Модуль: main
  • Путь к файлу: ~/bitrix/modules/main/classes/general/debuginfo.php
  • Класс: CDebugInfo
  • Вызов: CDebugInfo::Stop
public function Stop($rel_path = "", $path = "", $cache_type = "")
{
	global $DB;
	global $CACHE_STAT_BYTES;

	if ($this->is_comp)
	{
		self::$level--;
	}

	$this->arResult = [
		"PATH" => $path,
		"REL_PATH" => $rel_path,
		"QUERY_COUNT" => 0,
		"QUERY_TIME" => 0,
		"QUERIES" => [],
		"TIME" => (microtime(true) - $this->start_time),
		"BX_STATE" => $GLOBALS["BX_STATE"],
		"CACHE_TYPE" => $cache_type,
		"CACHE_SIZE" => Cache::getShowCacheStat() ? CacheTracker::getCacheStatBytes() : 0,
		"LEVEL" => self::$level,
	];

	if ($this->savedTracker)
	{
		$application = Application::getInstance();
		$connection = $application->getConnection();
		$sqlTracker = $connection->getTracker();

		if ($sqlTracker->getCounter() > 0)
		{
			$this->arResult["QUERY_COUNT"] = $sqlTracker->getCounter();
			$this->arResult["QUERY_TIME"] = $sqlTracker->getTime();
			$this->arResult["QUERIES"] = $sqlTracker->getQueries();
		}

		$connection->setTracker($this->savedTracker);
		$DB->sqlTracker = $connection->getTracker();
		$this->savedTracker = null;
	}

	if (Cache::getShowCacheStat())
	{
		$this->arResult["CACHE"] = CacheTracker::getCacheTracking();
		CacheTracker::setCacheTracking($this->arCacheDebugSave);
		CacheTracker::setCacheStatBytes($CACHE_STAT_BYTES = $this->cache_size);
	}
}