MDL-76506 core\lock: Fix MDL_PERF and perfdebug checks

This commit is contained in:
Jonathan Champ 2022-11-28 18:53:44 -05:00
parent 0ea3d45e04
commit 189c4ce4de

View File

@ -93,7 +93,7 @@ class lock_config {
}
// If tracking performance, insert a timing wrapper to keep track of lock delays.
if (defined('MDL_PERF') || !empty($CFG->perfdebug)) {
if ((defined('MDL_PERF') && MDL_PERF) || (!empty($CFG->perfdebug) && $CFG->perfdebug > 7)) {
$wrapper = new timing_wrapper_lock_factory($type, $lockfactory);
$lockfactory = $wrapper;
}