You are here

function performance_cron in Performance Logging and Monitoring 7

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

Implementation of hook_cron().

File

./performance.module, line 98
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_cron() {

  // One day ago.
  $timestamp = REQUEST_TIME - 24 * 60 * 60;
  $threshold = variable_get('performance_threshold_accesses', 0);
  foreach (performance_data_stores() as $store => $data) {
    if ($data['#enabled']) {
      call_user_func('performance_prune_' . $store, $timestamp, $threshold);
    }
  }
}