• Модуль: disk
  • Путь к файлу: ~/bitrix/modules/disk/lib/internals/diag.php
  • Класс: BitrixDiskInternalsDiag
  • Вызов: Diag::registerShutdownFunction
private function registerShutdownFunction()
{
	$shutdown = function() {
		if (
			(
				($this->sqlBehavior & (self::SQL_COUNT | self::SQL_DETECT_LIKE | self::SQL_PRINT_ALL)) ||
				($this->enableTimeTracker)
			) &&
			($this->summarySqlCount > 0 && $this->summaryTime > 0)
		)
		{
			$this->log(
				[
					'Sql count' => $this->summarySqlCount,
					'Total time' => $this->summaryTime,
				]
			);

		}
	};
	register_shutdown_function($shutdown->bindTo($this, $this));
}