From de8cfefc763d2fb488b51b5b245b20ba42deb320 Mon Sep 17 00:00:00 2001 From: Domas Mituzas Date: Mon, 14 Aug 2006 21:34:57 +0000 Subject: [PATCH] add wfGetAllCallers(), utility function for some occasional profiling magic --- includes/GlobalFunctions.php | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index dc299f649b..0de411a697 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -2073,4 +2073,15 @@ function wfGetCaller( $level = 2 ) { return $caller; } +/** Return a string consisting all callers in stack, somewhat useful sometimes for profiling specific points */ +function wfGetAllCallers() { + return implode('/', array_map( + create_function('$frame',' + return isset( $frame["class"] )? + $frame["class"]."::".$frame["function"]: + $frame["function"]; + '), + array_reverse(debug_backtrace()))); +} + ?> -- 2.20.1