From 2476fd0cda4b22268b922bc28fa0e11b5c212e64 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Tue, 25 Mar 2008 17:21:00 +0000 Subject: [PATCH] simple profiler text output --- includes/ProfilerSimpleText.php | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 includes/ProfilerSimpleText.php 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']); }	
+}
+?>
-- 
2.20.1