diff options
author | Brion Vibber <brion@pobox.com> | 2010-12-17 11:46:11 -0800 |
---|---|---|
committer | Brion Vibber <brion@pobox.com> | 2010-12-17 11:46:11 -0800 |
commit | 0535a3d15c08cd847299e15df7a707b6658c6480 (patch) | |
tree | f079a8f0fc92ecedc8e0957188fb379afc8b649e /classes/Memcached_DataObject.php | |
parent | 66b89de256ee5cf875e621b586381a29f6d418b1 (diff) |
Event hook for SQLProfile
Diffstat (limited to 'classes/Memcached_DataObject.php')
-rw-r--r-- | classes/Memcached_DataObject.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/Memcached_DataObject.php b/classes/Memcached_DataObject.php index ccfd886a1..eb5d2627f 100644 --- a/classes/Memcached_DataObject.php +++ b/classes/Memcached_DataObject.php @@ -338,7 +338,11 @@ class Memcached_DataObject extends Safe_DataObject } $start = microtime(true); - $result = parent::_query($string); + $result = null; + if (Event::handle('StartDBQuery', array($this, $string, &$result))) { + $result = parent::_query($string); + Event::handle('EndDBQuery', array($this, $string, &$result)); + } $delta = microtime(true) - $start; $limit = common_config('db', 'log_slow_queries'); |