wiki.techinc.nl/StartProfiler.sample
Aaron Schulz 7dba64f2c1 Revert "Remove deprecated profiling config parameters, clarify docs"
StatCounter still needs $wgUDPProfilerHost.

This reverts commit 88c42dc1df.

Change-Id: I4a56f6fb6bc454d15a9dc752f45dfb29b2b47a84
2014-12-04 21:40:13 +00:00

33 lines
1.2 KiB
Text

<?php
/**
* To use a profiler, copy this file to StartProfiler.php,
* and add either:
* $wgProfiler['class'] = 'ProfilerStandard';
* or
* $wgProfiler['class'] = 'ProfilerXhprof';
*
* For output, add:
* $wgProfiler['output'] = array( 'text' );
* 'text' can be one (or more) of 'text' 'udp' or 'db'
* 'db' requires creating the profiling table, see patch-profiling.sql
*
* The 'text' output will be added to the output page in a comment approriate
* to the output's mime type. For a text/html page, this display can be
* changed to a preformatted text block by setting the 'visible' configuration
* flag:
* $wgProfiler['visible'] = true;
*
* The 'db' output expects a database table that can be created by applying
* maintenance/archives/patch-profiling.sql to your database.
*
* For a rudimentary sampling profiler:
* $wgProfiler['class'] = 'ProfilerStandard';
* $wgProfiler['output'] = array( 'db' );
* $wgProfiler['sampling'] = 50; // one every 50 requests
* This will use ProfilerStub for non-sampled cases.
*
* For performance, the profiler is always disabled for CLI scripts
* as they could be long running and the data would accumulate. Use
* the --profiler parameter of maintenance scripts to override this.
*/