From: Victor Vasiliev Date: Mon, 14 Jan 2008 18:46:31 +0000 (+0000) Subject: Tweak profileinfo.php: X-Git-Tag: 1.31.0-rc.0~50002 X-Git-Url: http://git.cyclocoop.org/%22%2C%20generer_url_ecrire%28?a=commitdiff_plain;h=972b0afa76d11d6e9599af8176796c41a8a788ba;p=lhc%2Fweb%2Fwiklou.git Tweak profileinfo.php: * Added average calls per request column * Added time % column --- diff --git a/profileinfo.php b/profileinfo.php index 4e2a3d76ac..9290ad400a 100644 --- a/profileinfo.php +++ b/profileinfo.php @@ -36,7 +36,7 @@ padding-right: 0.5em; } - td.time, td.count { + td.time, td.timep, td.count, td.cpr { text-align: right; } @@ -49,6 +49,7 @@ $wgDBadminuser = $wgDBadminpassword = $wgDBserver = $wgDBname = $wgEnableProfile define( 'MW_NO_SETUP', 1 ); require_once( './includes/WebStart.php' ); require_once("./AdminSettings.php"); +require_once( './includes/GlobalFunctions.php' ); if (!$wgEnableProfileInfo) { echo "disabled\n"; @@ -85,7 +86,7 @@ class profile_point { } function display($indent = 0.0) { - global $expand; + global $expand, $totaltime, $totalcount; usort($this->children, "compare_point"); $extet = ''; @@ -108,7 +109,9 @@ class profile_point { ?> fmttime() ?> + time() / $totaltime * 100 ) ?> count() ?> + count() / $totalcount ), 2 ) ?> name()) . $extet ?> @@ -179,11 +182,14 @@ else $filter = ''; + +pf_name, $o->pf_count, $o->pf_time); - $totaltime += $next->time(); + if( $next->name() == '-total' ) { + $totaltime = $next->time(); + $totalcount = $next->count(); + } if ($last !== false) { if (preg_match("/^".preg_quote($last->name(), "/")."/", $next->name())) { $last->add_child($next);
">TimeTime (%) ">CountAvg calls per request ">Name