You are here

function performance_apc_list_all in Performance Logging and Monitoring 7

Same name and namespace in other branches
  1. 5 performance.module \performance_apc_list_all()
  2. 6 performance.module \performance_apc_list_all()

Helper function to get all Performance logging APC keys.

Parameters

$timestamp unix timestamp to start fetching data from:

Return value

array of APC keys

3 calls to performance_apc_list_all()
performance_clear_apc in ./performance.module
Clear APC confirm form submit handler.
performance_get_data_apc in ./performance.module
Helper function to get data from APC.
performance_prune_apc in ./performance.module
Helper function to cleanup APC data.

File

./performance.module, line 510
Logs detailed and/or summary page generation time and memory consumption for page requests. Copyright Khalid Baheyeldin 2008 of http://2bits.com

Code

function performance_apc_list_all($timestamp = 0) {
  $key_list = array();
  $list = apc_cache_info('user');
  if (!empty($list['cache_list'])) {
    foreach ($list['cache_list'] as $cache_id => $cache_data) {
      $regex = '/^' . PERFORMANCE_KEY . '/';

      // creation_time and mtime are always the same in our case.
      if (preg_match($regex, $cache_data['info']) && $cache_data['creation_time'] >= $timestamp) {
        $key_list[] = $cache_data['info'];
      }
    }
  }
  return $key_list;
}