You are here

function drush_performance_get_summary in Performance Logging and Monitoring 6.2

Same name and namespace in other branches
  1. 7.2 performance.drush.inc \drush_performance_get_summary()

Callback used by performance_traverse_cache() for fetching summary data.

Parameters

$cache cache object:

$arguments associative array containing limit and timestamp:

Return value

the processed data or NULL

See also

performance_traverse_cache()

1 string reference to 'drush_performance_get_summary'
drush_performance_summary in ./performance.drush.inc
Summary page callback. Differs a little from the version in the module because drush_print_table() works differently.

File

./performance.drush.inc, line 309
Drush integration for the Performance module.

Code

function drush_performance_get_summary($cache, $arguments) {
  static $count = 0;
  if ($cache->data['last_access'] >= $arguments['timestamp'] && $count < $arguments['limit']) {
    $count++;
    return $cache->data;
  }
  return;
}