From: daniel Date: Thu, 31 Jan 2013 14:39:37 +0000 (+0100) Subject: Profiling for hook calls. X-Git-Tag: 1.31.0-rc.0~20828^2 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/?a=commitdiff_plain;h=5d270eb65de80b1fba024102eea82b63ba22c968;p=lhc%2Fweb%2Fwiklou.git Profiling for hook calls. This is similar to profiloing for db queries. Change-Id: I14051f8aff30d249f4197270337e4080adfa5417 --- diff --git a/includes/Hooks.php b/includes/Hooks.php index 9e201a229a..a29e5fe506 100644 --- a/includes/Hooks.php +++ b/includes/Hooks.php @@ -150,6 +150,7 @@ class Hooks { return true; } + wfProfileIn( 'hook: ' . $event ); $hooks = self::getHandlers( $event ); foreach ( $hooks as $hook ) { @@ -288,10 +289,12 @@ class Hooks { ); } } elseif ( !$retval ) { + wfProfileOut( 'hook: ' . $event ); return false; } } + wfProfileOut( 'hook: ' . $event ); return true; }