Enable util scripts to be profiled again and ensure
that non-util script runs that don't include version.php
are also able to provide some output.
See David's commit for how export ensures version is used.
To support PHPUnit we need to support large profiles, these may
include backups and restores. To do that the following was required;
- gzcompress for database space saving.
- gzcompress for XML DomDocument field to say < 10Mb and allow imports.
- Save PHPUnit runs directly to a file so they can be imported to the normal database.
- Memory allowance on profiling view pages increases to support large profiles.
PHP7 doesn't have any default XHProf support and all other
investigated forks don't have stable PHP7. Tideways is under
active development and is easy to install. The data format
is compatible with XHProf so it is a drop-in replacement in that way.
The box API was used with an extra incorrect parameter
in the profiling code. It worked without issue until
the introduction of error checking in MDL-40842. It
has failed since then.
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)