BlueSpice MediaWiki REL1_27
 All Classes Namespaces Files Functions Variables Groups Pages
ProfilerXhprof Class Reference
Inheritance diagram for ProfilerXhprof:
Collaboration diagram for ProfilerXhprof:

Public Member Functions

 __construct (array $params=[])
 
 scopedProfileIn ($section)
 
 close ()
 
 getFunctionStats ()
 
 getOutput ()
 
 getRawData ()
 
- Public Member Functions inherited from Profiler
 __construct (array $params)
 
 setProfileID ($id)
 
 getProfileID ()
 
 setContext ($context)
 
 getContext ()
 
 profileIn ($functionname)
 
 profileOut ($functionname)
 
 scopedProfileIn ($section)
 
 scopedProfileOut (ScopedCallback &$section=null)
 
 getTransactionProfiler ()
 
 close ()
 
 logData ()
 
 logDataPageOutputOnly ()
 
 getContentType ()
 
 setTemplated ($t)
 
 getTemplated ()
 
 getFunctionStats ()
 
 getOutput ()
 

Protected Member Functions

 getFunctionReport ()
 

Protected Attributes

 $xhprof
 
 $sprofiler
 
- Protected Attributes inherited from Profiler
 $profileID = false
 
 $templated = false
 
 $params = []
 
 $context = null
 
 $trxProfiler
 

Additional Inherited Members

- Static Public Member Functions inherited from Profiler
static instance ()
 
static replaceStubInstance (Profiler $profiler)
 

Detailed Description

Profiler wrapper for XHProf extension.

$wgProfiler['class'] = 'ProfilerXhprof';
$wgProfiler['flags'] = XHPROF_FLAGS_NO_BUILTINS;
$wgProfiler['output'] = 'text';
$wgProfiler['visible'] = true;
$wgProfiler['class'] = 'ProfilerXhprof';
$wgProfiler['flags'] = XHPROF_FLAGS_CPU | XHPROF_FLAGS_MEMORY | XHPROF_FLAGS_NO_BUILTINS;
$wgProfiler['output'] = 'udp';

ProfilerXhprof profiles all functions using the XHProf PHP extenstion. For PHP5 users, this extension can be installed via PECL or your operating system's package manager. XHProf support is built into HHVM.

To restrict the functions for which profiling data is collected, you can use either a whitelist ($wgProfiler['include']) or a blacklist ($wgProfiler['exclude']) containing an array of function names. Shell-style patterns are also accepted.

Author
Bryan Davis bd808.nosp@m.@wik.nosp@m.imedi.nosp@m.a.or.nosp@m.g
See Also
Xhprof
https://php.net/xhprof
https://github.com/facebook/hhvm/blob/master/hphp/doc/profiling.md

Constructor & Destructor Documentation

ProfilerXhprof::__construct ( array  $params = [])
Parameters
array$params
See Also
Xhprof::__construct()

Member Function Documentation

ProfilerXhprof::close ( )

No-op for xhprof profiling.

ProfilerXhprof::getFunctionReport ( )
protected

Get a report of profiled functions sorted by inclusive wall clock time in descending order.

Each line of the report includes this data:

  • Function name
  • Number of times function was called
  • Total wall clock time spent in function in microseconds
  • Minimum wall clock time spent in function in microseconds
  • Average wall clock time spent in function in microseconds
  • Maximum wall clock time spent in function in microseconds
  • Percentage of total wall clock time spent in function
  • Total delta of memory usage from start to end of function in bytes
Returns
string
ProfilerXhprof::getOutput ( )

Returns a profiling output to be stored in debug file

Returns
string
ProfilerXhprof::getRawData ( )

Retrieve raw data from xhprof

Returns
array

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