4 * To use a profiler, copy this file to StartProfiler.php,
6 * $wgProfiler['class'] = 'ProfilerStandard';
8 * $wgProfiler['class'] = 'ProfilerXhprof';
11 * $wgProfiler['output'] = array( 'text' );
12 * 'text' can be one (or more) of 'text' 'udp' or 'db'
13 * 'db' requires creating the profiling table, see patch-profiling.sql
15 * The 'text' output will be added to the output page in a comment approriate
16 * to the output's mime type. For a text/html page, this display can be
17 * changed to a preformatted text block by setting the 'visible' configuration
19 * $wgProfiler['visible'] = true;
21 * The 'db' output expects a database table that can be created by applying
22 * maintenance/archives/patch-profiling.sql to your database. You can also
23 * set $wgProfiler['perHost'] to true to store this data on a per-host basis.
25 * 'udp' also has additional parameters of 'udphost', 'udpport' and 'udpformat'
26 * for the destination host, port and line format.
28 * For a rudimentary sampling profiler:
29 * $wgProfiler['class'] = 'ProfilerStandard';
30 * $wgProfiler['output'] = array( 'db' );
31 * $wgProfiler['sampling'] = 50; // one every 50 requests
32 * This will use ProfilerStub for non-sampled cases.
34 * For performance, the profiler is always disabled for CLI scripts
35 * as they could be long running and the data would accumulate. Use
36 * the --profiler parameter of maintenance scripts to override this.