diff options
Diffstat (limited to 'jstests/aggregation/sources/setWindowFields/explain.js')
| -rw-r--r-- | jstests/aggregation/sources/setWindowFields/explain.js | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/jstests/aggregation/sources/setWindowFields/explain.js b/jstests/aggregation/sources/setWindowFields/explain.js index cae112cb9e5..a070aae7b0e 100644 --- a/jstests/aggregation/sources/setWindowFields/explain.js +++ b/jstests/aggregation/sources/setWindowFields/explain.js @@ -16,8 +16,9 @@ coll.drop(); const bigStr = Array(1025).toString(); // 1KB of ',' const nDocs = 1000; const nPartitions = 50; -// Size was found through logging in 'SpillableCache' class. -const docSize = 1292; +// Initial docSize is 1292, after fields are loaded into Document's cache they are 2332. +// Not const because post-cache doc size changes based on the number of fields accessed. +let docSize = 2332; let bulk = coll.initializeUnorderedBulkOp(); for (let i = 1; i <= nDocs; i++) { @@ -137,6 +138,8 @@ function checkExplainResult(pipeline, expectedFunctionMemUsages, expectedTotalMe // The partition iterator will only hold five documents at once. After they are added to the // removable document executor they will be released. const numDocsHeld = 5; + // This test accesses fewer fields, reduce docSize accordingly. + docSize = 1292; let pipeline = [ { $setWindowFields: { |
