From 5d270eb65de80b1fba024102eea82b63ba22c968 Mon Sep 17 00:00:00 2001 From: daniel Date: Thu, 31 Jan 2013 15:39:37 +0100 Subject: [PATCH] Profiling for hook calls. This is similar to profiloing for db queries. Change-Id: I14051f8aff30d249f4197270337e4080adfa5417 --- includes/Hooks.php | 3 +++ 1 file changed, 3 insertions(+) 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; } -- 2.20.1