53 if ( self::isEnabled() ) {
54 throw new Exception(
'Profiling is already enabled.' );
56 self::$enabled =
true;
57 if ( function_exists(
'xhprof_enable' ) ) {
59 } elseif ( function_exists(
'tideways_enable' ) ) {
62 throw new Exception(
"Neither xhprof nor tideways are installed" );
72 if ( self::isEnabled() ) {
73 self::$enabled =
false;
74 if ( function_exists(
'xhprof_disable' ) ) {
75 return xhprof_disable();
Convenience class for working with XHProf https://github.com/phacility/xhprof.
static enable( $flags=0, $options=[])
Start xhprof profiler.
static disable()
Stop xhprof profiler.
static isEnabled()
Start xhprof profiler.
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
tideways_enable()
Minimal set of classes necessary for Xhprof using tideways phpcs:ignoreFile.