Event hook for SQLProfile
This commit is contained in:
parent
66b89de256
commit
0535a3d15c
|
@ -338,7 +338,11 @@ class Memcached_DataObject extends Safe_DataObject
|
||||||
}
|
}
|
||||||
|
|
||||||
$start = microtime(true);
|
$start = microtime(true);
|
||||||
|
$result = null;
|
||||||
|
if (Event::handle('StartDBQuery', array($this, $string, &$result))) {
|
||||||
$result = parent::_query($string);
|
$result = parent::_query($string);
|
||||||
|
Event::handle('EndDBQuery', array($this, $string, &$result));
|
||||||
|
}
|
||||||
$delta = microtime(true) - $start;
|
$delta = microtime(true) - $start;
|
||||||
|
|
||||||
$limit = common_config('db', 'log_slow_queries');
|
$limit = common_config('db', 'log_slow_queries');
|
||||||
|
|
Loading…
Reference in New Issue
Block a user