protected function processFileList(array $cacheList)
 {
     $list = array();
     foreach ($cacheList as $item) {
         $list[] = array(number_format($item['num_hits']), $item['access_time'] > 0 ? 'Yes' : 'No', $item['deletion_time'] > 0 ? 'Yes' : 'No', Formatter::bytes($item['mem_size']), $this->processFilename($item['filename']));
     }
     return $list;
 }
예제 #2
0
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $this->ensureExtensionLoaded('apc');
     $sma = $this->getCacheTool()->apc_sma_info(true);
     $output->writeln(sprintf("<comment>Segments: <info>%s</info></comment>", $sma['num_seg']));
     $output->writeln(sprintf("<comment>Segment size: <info>%s</info></comment>", Formatter::bytes($sma['seg_size'])));
     $output->writeln(sprintf("<comment>Available memory: <info>%s</info></comment>", Formatter::bytes($sma['avail_mem'])));
 }
 protected function processFileList(array $cacheList)
 {
     $list = array();
     foreach ($cacheList as $item) {
         $list[] = array(number_format($item['hits']), Formatter::bytes($item['memory_consumption']), $this->processFilename($item['full_path']));
     }
     return $list;
 }
예제 #4
0
 /**
  * @param  array $user
  * @param  array $system
  * @return array
  */
 protected function getRows($user, $system)
 {
     // missing: cache_list, deleted_list, slot_distribution
     return array(array('Slots', $user['num_slots'], $system['num_slots']), array('TTL', $user['ttl'], $system['ttl']), array('Hits', number_format($user['num_hits']), number_format($system['num_hits'])), array('Misses', number_format($user['num_misses']), number_format($system['num_misses'])), array('Inserts', number_format($user['num_inserts']), number_format($system['num_inserts'])), array('Expunges', number_format($user['expunges']), number_format($system['expunges'])), array('Start time', Formatter::date($user['start_time'], 'U'), Formatter::date($system['start_time'], 'U')), array('Memory size', Formatter::bytes($user['mem_size']), Formatter::bytes($system['mem_size'])), array('Entries', number_format($user['num_entries']), number_format($system['num_entries'])), array('File upload progress', $user['file_upload_progress'] ? 'Yes' : 'No', $system['file_upload_progress'] ? 'Yes' : 'No'), array('Memory type', $user['memory_type'], $system['memory_type']), array('Locking type', isset($user['locking_type']) ? $user['locking_type'] : 'Not Supported', isset($system['locking_type']) ? $system['locking_type'] : 'Not Supported'));
 }
 /**
  * {@inheritdoc}
  */
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $size = $this->getCacheTool()->stat_realpath_size();
     $output->writeln(sprintf("<comment>Realpath cache size: <info>%s</info></comment>", Formatter::bytes($size)));
 }
예제 #6
0
 /**
  * @param  array $stats
  * @return array
  */
 protected function getOpcacheStatsRows($stats)
 {
     return array(new TableSeparator(), array('Cached scripts', $stats['num_cached_scripts']), array('Cached keys', $stats['num_cached_keys']), array('Max cached keys', $stats['max_cached_keys']), array('Start time', Formatter::date($stats['start_time'], 'U')), array('Last restart time', $stats['last_restart_time'] ? Formatter::date($stats['last_restart_time'], 'U') : 'Never'), array('Oom restarts', $stats['oom_restarts']), array('Hash restarts', $stats['hash_restarts']), array('Manual restarts', $stats['manual_restarts']), array('Hits', $stats['hits']), array('Misses', $stats['misses']), array('Blacklist misses (%)', sprintf('%s (%s%%)', $stats['blacklist_misses'], $stats['blacklist_miss_ratio'])), array('Opcache hit rate', $stats['opcache_hit_rate']));
 }