You are here

function devel_query_summary in Devel 6

Same name and namespace in other branches
  1. 5 devel.module \devel_query_summary()
  2. 7 devel.module \devel_query_summary()
1 call to devel_query_summary()
devel_shutdown_real in ./devel.module
See devel_shutdown() which registers this function as a shutdown function. Displays developer information in the footer.

File

./devel.module, line 968

Code

function devel_query_summary() {
  global $queries;
  if (variable_get('dev_query', FALSE) && is_array($queries)) {
    $sum = 0;
    foreach ($queries as $query) {
      $text[] = $query[0];
      $sum += $query[1];
    }
    $counts = array_count_values($text);
    return array(
      $counts,
      t_safe('Executed @queries queries in @time milliseconds.', array(
        '@queries' => count($queries),
        '@time' => round($sum * 1000, 2),
      )),
    );
  }
}