aboutsummaryrefslogtreecommitdiffstats
path: root/includes/profiler/Profiler.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/profiler/Profiler.php')
-rw-r--r--includes/profiler/Profiler.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/includes/profiler/Profiler.php b/includes/profiler/Profiler.php
index d5b0ad5cba2b..d7608fb2242a 100644
--- a/includes/profiler/Profiler.php
+++ b/includes/profiler/Profiler.php
@@ -76,7 +76,7 @@ abstract class Profiler {
// Avoid global func wfIsCLI() during setup
$isCLI = ( PHP_SAPI === 'cli' || PHP_SAPI === 'phpdbg' );
- $inSample = $params['sampling'] === 1 || mt_rand( 0, $params['sampling'] - 1 ) === 0;
+ $inSample = $params['sampling'] === 1 || mt_rand( 1, $params['sampling'] ) === 1;
if (
!$inSample ||
// On CLI, profiling is disabled by default, and can be explicitly enabled