forked from wikimedia/mediawiki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathStartProfiler.sample
33 lines (32 loc) · 1.24 KB
/
StartProfiler.sample
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?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.
*/