summaryrefslogtreecommitdiff
path: root/src/mongo/db/server_options.h
diff options
context:
space:
mode:
authorEvan Broder <evan@stripe.com>2016-07-05 21:02:49 -0700
committerDavid Storch <david.storch@10gen.com>2017-01-26 18:35:29 -0500
commit94b37aac060bcc8b10c3eb41f178d84008136f9c (patch)
treef98c9f60273345ea880af48ab14ad7ac8ef167cd /src/mongo/db/server_options.h
parent249eaae3e1b78ed5c4b6b7425145a23dc658fd75 (diff)
downloadmongo-94b37aac060bcc8b10c3eb41f178d84008136f9c.tar.gz
SERVER-4786 Allow specifying sample rate of slow queries
Adds a sampleRate parameter to the profile command, a value on the interval [0, 1] which indicates which fraction of operations should be randomly sampled for profiling and logging. This allows users to reduce their slowms threshold or increase their profiling level with less performance impact on the system. Closes #1099 Signed-off-by: David Storch <david.storch@10gen.com>
Diffstat (limited to 'src/mongo/db/server_options.h')
-rw-r--r--src/mongo/db/server_options.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mongo/db/server_options.h b/src/mongo/db/server_options.h
index 13dc2705150..95bd873740c 100644
--- a/src/mongo/db/server_options.h
+++ b/src/mongo/db/server_options.h
@@ -65,6 +65,7 @@ struct ServerGlobalParams {
int defaultProfile = 0; // --profile
int slowMS = 100; // --time in ms that is "slow"
+ double sampleRate = 1.0; // --samplerate rate at which to sample slow queries
int defaultLocalThresholdMillis = 15; // --localThreshold in ms to consider a node local
bool moveParanoia = false; // for move chunk paranoia