Get stats (pmu, ct, wt) on a url or c_url
public getUrlStats ( array $data ) : resource | ||
$data | array | An associative array containing the limit you'd like to set for the queyr, as well as either c_url or url for the desired element. |
Результат | resource | result set from the database query |
$params[$k] = ${$k}; // unset key from params that are using default values. So URLs aren't // ridiculously long. if ($params[$k] == $v[1]) { unset($params[$k]); } } $vbar = ' class="vbar"'; $vwbar = ' class="vwbar"'; $vwlbar = ' class="vwlbar"'; $vbbar = ' class="vbbar"'; $vrbar = ' class="vrbar"'; $vgbar = ' class="vgbar"'; $xhprof_runs_impl = new XHProfRuns_Default(); if (isset($_GET['geturl'])) { $rs = $xhprof_runs_impl->getUrlStats(array("url" => $_GET['geturl'], 'limit' => 100)); showChart($rs); $rs = $xhprof_runs_impl->getRuns(array('url' => $_GET['geturl'], 'limit' => 100)); $url = htmlentities($_GET['geturl'], ENT_QUOTES); displayRuns($rs, "Runs with URL: {$url}"); } elseif (isset($_GET['getcurl'])) { $rs = $xhprof_runs_impl->getUrlStats(array("c_url" => $_GET['getcurl'], 'limit' => 100)); showChart($rs); $url = htmlentities($_GET['getcurl'], ENT_QUOTES); $rs = $xhprof_runs_impl->getRuns(array('c_url' => $_GET['getcurl'], 'limit' => 100)); displayRuns($rs, "Runs with Simplified URL: {$url}"); } elseif (isset($_GET['last'])) { $last = (int) $_GET['last']; $rs = $xhprof_runs_impl->getRuns(array("order by" => 'timestamp', 'limit' => $last)); displayRuns($rs, "Last {$last} Runs"); } elseif (isset($_GET['getruns'])) {