diff options
Diffstat (limited to 'src/mongo/db/mongod_options.cpp')
-rw-r--r-- | src/mongo/db/mongod_options.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp index 921de16e082..3824340a934 100644 --- a/src/mongo/db/mongod_options.cpp +++ b/src/mongo/db/mongod_options.cpp @@ -146,6 +146,13 @@ Status addMongodOptions(moe::OptionSection* options) { "value of slow for profile and console log") .setDefault(moe::Value(100)); + general_options + .addOptionChaining("operationProfiling.slowOpSampleRate", + "slowOpSampleRate", + moe::Double, + "fraction of slow ops to include in the profile and console log") + .setDefault(moe::Value(1.0)); + general_options.addOptionChaining("profile", "profile", moe::Int, "0=off 1=slow, 2=all") .setSources(moe::SourceAllLegacy); @@ -1044,6 +1051,10 @@ Status storeMongodOptions(const moe::Environment& params) { serverGlobalParams.slowMS = params["operationProfiling.slowOpThresholdMs"].as<int>(); } + if (params.count("operationProfiling.slowOpSampleRate")) { + serverGlobalParams.sampleRate = params["operationProfiling.slowOpSampleRate"].as<double>(); + } + if (params.count("storage.syncPeriodSecs")) { storageGlobalParams.syncdelay = params["storage.syncPeriodSecs"].as<double>(); if (storageGlobalParams.syncdelay < 0 || |