You are here

function devel_query_summary in Devel 5

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

File

./devel.module, line 628

Code

function devel_query_summary() {
  global $queries;
  if (variable_get('dev_query', FALSE) && is_array($queries)) {
    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),
      )),
    );
  }
}