• Модуль: perfmon
  • Путь к файлу: ~/bitrix/modules/perfmon/classes/general/measure.php
  • Класс: CPerfAccel
  • Вызов: CPerfAccel::IsWorking
function IsWorking()
{
	if (!$this->enabled)
	{
		return false;
	}

	if ($this->cache_ttl == 0)
	{
		return false;
	}

	if ($this->max_file_size >= 0)
	{
		if ($this->max_file_size < 4 * 1024 * 1024)
		{
			return false;
		}
	}

	if (!$this->check_mtime)
	{
		return false;
	}

	if ($this->memory_used >= 0)
	{
		//Check for 10% free
		if (($this->memory_used / $this->memory_total) > 0.9)
		{
			return false;
		}
	}
	else
	{
		//Or at least 40M total when no used memory stat available
		if ($this->memory_total < 40 * 1024 * 1024)
		{
			return false;
		}
	}

	if ($this->cache_limit == 0)
	{
		return false;
	}

	return true;
}