- * Or for a sampling profiler:
- * if ( !mt_rand( 0, 100 ) ) {
- * $wgProfiler['class'] = 'ProfilerSimpleDB';
- * } else {
- * $wgProfiler['class'] = 'ProfilerStub';
- * }
+ * For a rudimentary sampling profiler:
+ * $wgProfiler['class'] = 'ProfilerXhprof';
+ * $wgProfiler['output'] = array( 'db' );
+ * $wgProfiler['sampling'] = 50; // one every 50 requests
+ * This will use ProfilerStub for non-sampled cases.