function devel_query_summary

Returns the query summary.

Return value

array An index array containing: 0: The an associative array where the keys are the queries and the values are number of times that query was executes. 1: The summary. 2: An associative array of substitution variables to be applied in the previous element.

2 calls to devel_query_summary()
devel_shutdown_query in ./devel.module
Returns the rendered query log.
devel_shutdown_summary in ./devel.module
Returns the rendered shutdown summary.

File

./devel.module, line 1322

Code

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