dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
36518b8
)
add wfGetAllCallers(), utility function for some occasional profiling magic
author
Domas Mituzas
<midom@users.mediawiki.org>
Mon, 14 Aug 2006 21:34:57 +0000
(21:34 +0000)
committer
Domas Mituzas
<midom@users.mediawiki.org>
Mon, 14 Aug 2006 21:34:57 +0000
(21:34 +0000)
includes/GlobalFunctions.php
patch
|
blob
|
history
diff --git
a/includes/GlobalFunctions.php
b/includes/GlobalFunctions.php
index
dc299f6
..
0de411a
100644
(file)
--- 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())));
+}
+
?>