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