Esempio n. 1
0
 function GetRecommendations()
 {
     $arResult = parent::GetRecommendations();
     if (function_exists('accelerator_get_status')) {
         $is_ok = is_array(accelerator_get_status());
         array_unshift($arResult, array("PARAMETER" => GetMessage("PERFMON_MEASURE_OPCODE_CACHING"), "IS_OK" => $is_ok, "VALUE" => $is_ok ? GetMessage("PERFMON_MEASURE_UP_AND_RUNNING") : GetMessage("PERFMON_MEASURE_DISABLED"), "RECOMMENDATION" => ""));
     }
     return $arResult;
 }
Esempio n. 2
0
 function GetRecommendations()
 {
     $arResult = parent::GetRecommendations();
     if (extension_loaded('Zend OPcache')) {
         $max_accelerated_files = intval(ini_get('opcache.max_accelerated_files'));
         $rec_accelerated_files = 100000;
         $is_ok = $max_accelerated_files >= $rec_accelerated_files;
         array_unshift($arResult, array("PARAMETER" => "opcache.max_accelerated_files", "IS_OK" => $is_ok, "VALUE" => $max_accelerated_files, "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_EQUAL_OR_GREATER_THAN_REC", array("#value#" => $rec_accelerated_files))));
         if (function_exists('opcache_get_status')) {
             $cacheStatus = opcache_get_status(false);
             $cachedKeys = intval($cacheStatus['opcache_statistics']['num_cached_keys']);
             $maxKeys = intval($cacheStatus['opcache_statistics']['max_cached_keys']);
             $is_ok = $cachedKeys <= 0 || $maxKeys <= 0 || $cachedKeys < $maxKeys;
             if (!$is_ok) {
                 array_unshift($arResult, array("PARAMETER" => "opcache.max_accelerated_files", "IS_OK" => $is_ok, "VALUE" => $maxKeys, "RECOMMENDATION" => GetMessage("PERFMON_MEASURE_EQUAL_OR_GREATER_THAN_REC", array("#value#" => $cachedKeys))));
             }
         }
     }
     return $arResult;
 }