MediaWiki  master
Xhprof Class Reference

Convenience class for working with XHProf https://github.com/phacility/xhprof. More...

Static Public Member Functions

static disable ()
 Stop profiler. More...
 
static enable ( $flags=0, $options=[])
 Start profiler. More...
 

Static Protected Member Functions

static callAny (array $functions, array $args=[])
 Call the first available function from $functions. More...
 

Detailed Description

Convenience class for working with XHProf https://github.com/phacility/xhprof.

XHProf can be installed via PECL.

This also supports using the Tideways profiler https://github.com/tideways/php-xhprof-extension.

Access: internal
For use by ProfilerXhprof
Since
1.28

Definition at line 31 of file Xhprof.php.

Member Function Documentation

◆ callAny()

static Xhprof::callAny ( array  $functions,
array  $args = [] 
)
staticprotected

Call the first available function from $functions.

Parameters
array$functions
array$args
Returns
mixed
Exceptions
Exception

Definition at line 76 of file Xhprof.php.

References $args.

Referenced by disable(), and enable().

◆ disable()

static Xhprof::disable ( )
static

Stop profiler.

Returns
array Xhprof data since last enable call, or empty array if it was never enabled.

Definition at line 61 of file Xhprof.php.

References callAny().

Referenced by ProfilerXhprof\getXhprofData().

◆ enable()

static Xhprof::enable (   $flags = 0,
  $options = [] 
)
static

Start profiler.

Parameters
int$flags
array$options

Definition at line 39 of file Xhprof.php.

References $args, and callAny().

Referenced by ProfilerXhprof\__construct().


The documentation for this class was generated from the following file: