mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 08:26:37 +02:00
Merge branch 'MDL-74010-400' of https://github.com/paulholden/moodle into MOODLE_400_STABLE
This commit is contained in:
commit
49705b1f40
3 changed files with 8 additions and 5 deletions
|
@ -413,6 +413,9 @@ $CFG->admin = 'admin';
|
|||
// Print to footer (works with the default theme)
|
||||
// define('MDL_PERFTOFOOT', true);
|
||||
//
|
||||
// Print additional data to log of included files
|
||||
// define('MDL_PERFINC', true);
|
||||
//
|
||||
// Enable earlier profiling that causes more code to be covered
|
||||
// on every request (db connections, config load, other inits...).
|
||||
// Requires extra configuration to be defined in config.php like:
|
||||
|
|
|
@ -204,15 +204,15 @@ class core_shutdown_manager {
|
|||
}
|
||||
|
||||
// Deal with perf logging.
|
||||
if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {
|
||||
if ((defined('MDL_PERF') && MDL_PERF) || (!empty($CFG->perfdebug) && $CFG->perfdebug > 7)) {
|
||||
if ($apachereleasemem) {
|
||||
error_log('Mem usage over '.$apachereleasemem.': marking Apache child for reaping.');
|
||||
}
|
||||
if (defined('MDL_PERFTOLOG')) {
|
||||
if (defined('MDL_PERFTOLOG') && MDL_PERFTOLOG) {
|
||||
$perf = get_performance_info();
|
||||
error_log("PERF: " . $perf['txt']);
|
||||
}
|
||||
if (defined('MDL_PERFINC')) {
|
||||
if (defined('MDL_PERFINC') && MDL_PERFINC) {
|
||||
$inc = get_included_files();
|
||||
$ts = 0;
|
||||
foreach ($inc as $f) {
|
||||
|
|
|
@ -1507,9 +1507,9 @@ class core_renderer extends renderer_base {
|
|||
|
||||
// Provide some performance info if required
|
||||
$performanceinfo = '';
|
||||
if (defined('MDL_PERF') || (!empty($CFG->perfdebug) and $CFG->perfdebug > 7)) {
|
||||
if ((defined('MDL_PERF') && MDL_PERF) || (!empty($CFG->perfdebug) && $CFG->perfdebug > 7)) {
|
||||
$perf = get_performance_info();
|
||||
if (defined('MDL_PERFTOFOOT') || debugging() || $CFG->perfdebug > 7) {
|
||||
if ((defined('MDL_PERFTOFOOT') && MDL_PERFTOFOOT) || debugging() || $CFG->perfdebug > 7) {
|
||||
$performanceinfo = $perf['html'];
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue