$wgProfiling = false; # Enable for more detailed by-function times in debug log
$wgProfileLimit = 0.0; # Only record profiling info for pages that took longer than this
$wgProfileOnly = false; # Don't put non-profiling info into log file
+$wgProfileSampleRate = 1; # Only profile every n requests when profiling is turned on
$wgDebugProfiling = false; # Detects non-matching wfProfileIn/wfProfileOut calls
$wgDebugFunctionEntry = 0; # Output debug message on every wfProfileIn/wfProfileOut
-
$wgDisableCounters = false;
$wgDisableTextSearch = false;
$wgDisableSearchUpdate = false; # If you've disabled search semi-permanently, this also disables updates to the table. If you ever re-enable, be sure to rebuild the search table.
if( !isset( $wgProfiling ) )
$wgProfiling = false;
-if ( $wgProfiling ) {
+if ( $wgProfiling and (0 == rand() % $wgProfileSampleRate ) ) {
include_once( "Profiling.php" );
} else {
function wfProfileIn( $fn ) {}