mirror of
https://github.com/moodle/moodle.git
synced 2025-04-14 04:52:36 +02:00
Merge branch 'MDL-76506' of https://github.com/jrchamp/moodle
This commit is contained in:
commit
db2ee34986
4
cache/classes/loaders.php
vendored
4
cache/classes/loaders.php
vendored
@ -1690,7 +1690,7 @@ class cache_application extends cache implements cache_loader_with_locking {
|
||||
$after = microtime(true);
|
||||
if ($lock) {
|
||||
$this->locks[$key] = $lock;
|
||||
if (defined('MDL_PERF') || !empty($CFG->perfdebug)) {
|
||||
if ((defined('MDL_PERF') && MDL_PERF) || $this->perfdebug) {
|
||||
\core\lock\timing_wrapper_lock_factory::record_lock_data($after, $before,
|
||||
$this->get_definition()->get_id(), $key, $lock, $this->get_identifier() . $key);
|
||||
}
|
||||
@ -1735,7 +1735,7 @@ class cache_application extends cache implements cache_loader_with_locking {
|
||||
}
|
||||
if ($released && array_key_exists($key, $this->locks)) {
|
||||
unset($this->locks[$key]);
|
||||
if (defined('MDL_PERF') || !empty($CFG->perfdebug)) {
|
||||
if ((defined('MDL_PERF') && MDL_PERF) || $this->perfdebug) {
|
||||
\core\lock\timing_wrapper_lock_factory::record_lock_released_data($this->get_identifier() . $key);
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user