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; }
/** * {@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; }
/** * @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))); }
/** * @param array $info * @return array */ protected function getStringsRows($info) { return array(array('Strings buffer size', Formatter::bytes($info['interned_strings_usage']['buffer_size'])), array('Strings memory used', Formatter::bytes($info['interned_strings_usage']['used_memory'])), array('Strings memory free', Formatter::bytes($info['interned_strings_usage']['free_memory'])), array('Number of strings', $info['interned_strings_usage']['number_of_strings'])); }