c646dd26ea
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)
9 lines
431 B
PHP
9 lines
431 B
PHP
<?php
|
|
|
|
defined('MOODLE_INTERNAL') || die;
|
|
|
|
// profiling report, added to development
|
|
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'));
|
|
}
|