function _authcache_dev_query in Authenticated User Page Caching (Authcache) 6
Same name and namespace in other branches
- 7 ajax/authcache.php \_authcache_dev_query()
Database benchmarks for Authcache Ajax phase
1 call to _authcache_dev_query()
- authcache.php in ajax/
authcache.php - Authcache Ajax Callback (authcache.php)
File
- ajax/
authcache.php, line 299 - Authcache Ajax Callback (authcache.php)
Code
function _authcache_dev_query() {
global $queries;
if (!$queries) {
return;
}
$time_query = 0;
foreach ($queries as $q) {
$time_query += $q[1];
}
$time_query = round($time_query * 1000, 2);
// Convert seconds to milliseconds
$percent_query = round($time_query / timer_read('page') * 100);
return count($queries) . " queries @ {$time_query} ms";
}