fmttime() ?> |
time() / $totaltime * 100 ) ?> |
count() ?> |
count() / $totalcount ), 2 ) ?>
|
name()) . $extet ?>
|
children as $child)
$child->display($indent + 2);
}
function name() {
return $this->name;
}
function count() {
return $this->count;
}
function time() {
return $this->time;
}
function fmttime() {
return sprintf("%5.02f", $this->time);
}
};
function compare_point($a, $b) {
global $sort;
switch ($sort) {
case "name":
return strcmp($a->name(), $b->name());
case "time":
return $a->time() > $b->time() ? -1 : 1;
case "count":
return $a->count() > $b->count() ? -1 : 1;
}
}
$sorts = array("time", "count", "name");
$sort = 'time';
if (isset($_REQUEST['sort']) && in_array($_REQUEST['sort'], $sorts))
$sort = $_REQUEST['sort'];
$dbh = mysql_connect($wgDBserver, $wgDBadminuser, $wgDBadminpassword)
or die("mysql server failed: " . mysql_error());
mysql_select_db($wgDBname, $dbh) or die(mysql_error($dbh));
$res = mysql_query("
SELECT pf_count, pf_time, pf_name
FROM profiling
ORDER BY pf_name ASC
", $dbh) or die("query failed: " . mysql_error());
if (isset($_REQUEST['filter']))
$filter = $_REQUEST['filter'];
else $filter = '';
?>