// @codingStandardsIgnoreStart global $filter, $sort, $expand; // @codingStandardsIgnoreEnd if ($_expand === false) { $_expand = $expand; } return htmlspecialchars('?' . wfArrayToCgi(['filter' => $_filter ? $_filter : $filter, 'sort' => $_sort ? $_sort : $sort, 'expand' => implode(',', array_keys($_expand))])); } $points = []; $queries = []; $sqltotal = 0.0; $last = false; foreach ($res as $o) { $next = new profile_point($o->pf_name, $o->pf_count, $o->pf_time, $o->pf_memory); if ($next->name() == '-total' || $next->name() == 'main()') { profile_point::$totaltime = $next->time(); profile_point::$totalcount = $next->count(); profile_point::$totalmemory = $next->memory(); } if ($last !== false) { if (preg_match('/^' . preg_quote($last->name(), '/') . '/', $next->name())) { $last->add_child($next); continue; } } $last = $next; if (preg_match('/^query: /', $next->name()) || preg_match('/^query-m: /', $next->name())) { $sqltotal += $next->time(); $queries[] = $next; } else { $points[] = $next;