- Модуль: perfmon
- Путь к файлу: ~/bitrix/modules/perfmon/classes/general/measure.php
- Класс: CPerfAccelZendOpCache
- Вызов: CPerfAccelZendOpCache::GetParams
function GetParams()
{
$res = [
"enabled" => [[
"PARAMETER" => 'opcache.enable',
"VALUE" => ini_get('opcache.enable'),
"RECOMMENDATION" => Loc::getMessage("PERFMON_MEASURE_SET_REC", ["#value#" => "1"]),
]],
"check_mtime" => [[
"PARAMETER" => 'opcache.validate_timestamps',
"VALUE" => ini_get('opcache.validate_timestamps'),
"RECOMMENDATION" => Loc::getMessage("PERFMON_MEASURE_SET_REC", ["#value#" => "1"]),
]],
"memory_abs" => [[
"PARAMETER" => 'opcache.memory_consumption',
"VALUE" => ini_get('opcache.memory_consumption'),
"RECOMMENDATION" => Loc::getMessage("PERFMON_MEASURE_EQUAL_OR_GREATER_THAN_REC", ["#value#" => "40"]),
]],
"max_file_size" => [[
"PARAMETER" => 'opcache.max_file_size',
"VALUE" => ini_get('opcache.max_file_size'),
"RECOMMENDATION" => Loc::getMessage("PERFMON_MEASURE_SET_REC", ["#value#" => "0"]),
]],
];
if (function_exists("opcache_get_status"))
{
$conf = opcache_get_status(false);
$res["memory_abs"][] = [
"PARAMETER" => 'opcache.memory_usage.used_memory',
"VALUE" => CFile::FormatSize($conf["memory_usage"]["used_memory"]),
"RECOMMENDATION" => "",
];
$res["memory_abs"][] = [
"PARAMETER" => 'opcache.memory_usage.free_memory',
"VALUE" => CFile::FormatSize($conf["memory_usage"]["free_memory"]),
"RECOMMENDATION" => "",
];
}
return $res;
}