MDL-26891 profiling - earlier runs
This allows profiling to be started earlier in the setup.php execution, by configuring everything in the config.php file. That way some interesting code is also profiled, like DB connections, load of config records... 100% compatible with normal profiling and enabled via special setting $CFG->earlyprofilingenabled Example (to be put on config.php): $CFG->earlyprofilingenabled = true; $CFG->profilingautofrec = 3; $CFG->profilingincluded = '/*'; $CFG->profilingallowme = true; (to enable early profiling for 1/3 of any requests while also allowing to use the PROFILEME PGC)
This commit is contained in:
@@ -3,6 +3,6 @@
|
||||
defined('MOODLE_INTERNAL') || die;
|
||||
|
||||
// profiling report, added to development
|
||||
if (extension_loaded('xhprof') && function_exists('xhprof_enable') && !empty($CFG->profilingenabled)) {
|
||||
if (extension_loaded('xhprof') && function_exists('xhprof_enable') && (!empty($CFG->profilingenabled) || !empty($CFG->earlyprofilingenabled))) {
|
||||
$ADMIN->add('development', new admin_externalpage('reportprofiling', get_string('pluginname', 'report_profiling'), "$CFG->wwwroot/$CFG->admin/report/profiling/index.php", 'moodle/site:config'));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user