Manual:$wgProfiler

Details
This setting is used to configure man>Special:MyLanguage/Manual:Profiling|profiling of your MediaWiki installation.

For the available keys see .

They include:


 * : E.g.   provides an Xhprof-backed profiler. There is also   which works with .
 * : Define one or multiple output methods. For multiple output methods at the same time, use an array of class names, one for each output type you want the profiler to generate.  For example use the "ProfilerOutputText" profiler.  The output classes available to you by default are: ProfilerOutputDump, ProfilerOutputStats, ProfilerOutputText.

* ProfilerOutputStats outputs profiling data as StatsD metrics. It expects that you have set the $wgStatsdServer configuration variable to the host (or host:port) of your statsd server.

* ProfilerOutputText will output profiling data in the page body as a comment. You can make the profiling data in HTML render as part of the page content by setting the 'visible' configuration flag:  </>

<tvar|4>* ProfilerOutputDump</> expects a <tvar|5>$wgProfiler['outputDir']</> telling it where to write dump files. The files produced are compatible with the XHProf gui.
 * : <tvar|1><tt>true</tt></> or <tvar|2><tt>false</tt></>. If , output is displayed in HTML rendering (and not only in a comment).
 * : Positive integer. Profile every nth request.

For performance, the profiler is always disabled for CLI scripts as they could be long running and the data would accumulate.

Use the '<tvar|1>--profiler</>' parameter of maintenance scripts to override this.

Example
For a rudimentary debug profiler: