summaryrefslogtreecommitdiff
path: root/src/mongo/db/exec/trial_period_utils.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/exec/trial_period_utils.h')
-rw-r--r--src/mongo/db/exec/trial_period_utils.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/db/exec/trial_period_utils.h b/src/mongo/db/exec/trial_period_utils.h
index 53a9c91a889..f8e4d4a725f 100644
--- a/src/mongo/db/exec/trial_period_utils.h
+++ b/src/mongo/db/exec/trial_period_utils.h
@@ -39,11 +39,14 @@ namespace trial_period {
/**
* Returns the number of times that we are willing to work a plan during a trial period.
*
- * Calculated based on a fixed query knob and the size of the collection multiplied by
- * 'collFraction'.
+ * Calculated with the following formula, where "|collection|" denotes the approximate number of
+ * documents in the collection:
+ *
+ * max(maxWorksParam, collFraction * |collection|)
*/
size_t getTrialPeriodMaxWorks(OperationContext* opCtx,
const CollectionPtr& collection,
+ int maxWorksParam,
double collFraction);
/**