You are here

function performance_menu in Performance Logging and Monitoring 5

Same name and namespace in other branches
  1. 6.2 performance.module \performance_menu()
  2. 6 performance.module \performance_menu()
  3. 7.2 performance.module \performance_menu()
  4. 7 performance.module \performance_menu()

File

./performance.module, line 7

Code

function performance_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $access = user_access('access administration pages');
    $items[] = array(
      'path' => 'admin/settings/performance_logging',
      'title' => t('Performance Logging'),
      'description' => t('Logs performance data: page generation times and memory usage.'),
      'access' => $access,
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'performance_settings',
      ),
    );
    $items[] = array(
      'path' => 'admin/settings/performance_logging/apc_clear',
      'title' => t('Clear APC'),
      'description' => t('Clears performance statistics collected in APC.'),
      'access' => $access,
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'performance_clear_apc_confirm',
      ),
    );
    $items[] = array(
      'path' => 'admin/logs/performance_logging',
      'title' => t('Performance Logs'),
      'description' => t('View performance logs: summary and details.'),
      'access' => $access,
    );
    $items[] = array(
      'path' => 'admin/logs/performance_logging/summary',
      'title' => t('Performance Logs: Summary'),
      'description' => t('View summary performance logs: page generation times and memory usage.'),
      'access' => $access,
      'callback' => 'performance_view_summary',
    );
    $items[] = array(
      'path' => 'admin/logs/performance_logging/details',
      'title' => t('Performance Logs: Details'),
      'description' => t('View detailed, per page, performance logs: page generation times and memory usage.'),
      'access' => $access,
      'callback' => 'performance_view_details',
    );
  }
  return $items;
}