Event hook for SQLProfile

This commit is contained in:
Brion Vibber 2010-12-17 11:46:11 -08:00
parent 66b89de256
commit 0535a3d15c

View File

@ -338,7 +338,11 @@ class Memcached_DataObject extends Safe_DataObject
}
$start = microtime(true);
$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');