X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=StartProfiler.sample;h=d20c0e1bd9d8a8d2aeb68d57de06fec8ba44e5d1;hb=7b2af70c262383227e326d876b2d1946fcd4880e;hp=b72d5d59ff8731977ac62793a04936016d66a20d;hpb=df45c62a3486f809370e5da4efef100855971bba;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. */