From: Domas Mituzas Date: Tue, 25 Mar 2008 17:21:00 +0000 (+0000) Subject: simple profiler text output X-Git-Tag: 1.31.0-rc.0~48821 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=2476fd0cda4b22268b922bc28fa0e11b5c212e64;p=lhc%2Fweb%2Fwiklou.git simple profiler text output --- diff --git a/includes/ProfilerSimpleText.php b/includes/ProfilerSimpleText.php new file mode 100644 index 0000000000..7191c3fa58 --- /dev/null +++ b/includes/ProfilerSimpleText.php @@ -0,0 +1,29 @@ +visible=true; + +*/ +require_once(dirname(__FILE__).'/ProfilerSimple.php'); +class ProfilerSimpleText extends ProfilerSimple { + public $visible=false; /* Show as
 or \n";
+	}
+	/* dense is good */
+	function sort($a,$b) { return $a['real']<$b['real']; /* sort descending by time elapsed */ }
+	function tag(&$item,$key) { $item['function']=$key; }
+	function format($item,$key) { printf("%3.6f %6d - %s\n",$item['real'],$item['count'], $item['function']); }	
+}
+?>