X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=StartProfiler.sample;h=d20c0e1bd9d8a8d2aeb68d57de06fec8ba44e5d1;hb=4e26d0c8941082c60e51c1096cd0e4b0adbce7fa;hp=b72d5d59ff8731977ac62793a04936016d66a20d;hpb=a3fe441bf69f9e3cae6155b07f710ad21a1c6552;p=lhc%2Fweb%2Fwiklou.git diff --git a/StartProfiler.sample b/StartProfiler.sample index b72d5d59ff..d20c0e1bd9 100644 --- a/StartProfiler.sample +++ b/StartProfiler.sample @@ -22,8 +22,12 @@ * maintenance/archives/patch-profiling.sql to your database. * * For a rudimentary sampling profiler: - * if ( !mt_rand( 0, 100 ) ) { - * $wgProfiler['class'] = 'ProfilerStandard'; - * $wgProfiler['output'] = array( 'db' ); - * } + * $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. */