summaryrefslogtreecommitdiff
path: root/jstests/noPassthrough/index_build_operation_metrics.js
diff options
context:
space:
mode:
authorBrian DeLeonardis <brian.deleonardis@mongodb.com>2020-11-10 23:43:42 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2020-11-11 21:36:30 +0000
commitb457c077f0e7688d890885619eb33e73f4a65219 (patch)
tree78b7e6c16aea243336de27c02ce33e06e4921fb9 /jstests/noPassthrough/index_build_operation_metrics.js
parentcb0deac8d70bd1927546f751526441daaabd55ec (diff)
downloadmongo-b457c077f0e7688d890885619eb33e73f4a65219.tar.gz
SERVER-51785 Do not count oplog writes for resource consumption metrics
Diffstat (limited to 'jstests/noPassthrough/index_build_operation_metrics.js')
-rw-r--r--jstests/noPassthrough/index_build_operation_metrics.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/jstests/noPassthrough/index_build_operation_metrics.js b/jstests/noPassthrough/index_build_operation_metrics.js
index c2311e5a3ae..88b549e2467 100644
--- a/jstests/noPassthrough/index_build_operation_metrics.js
+++ b/jstests/noPassthrough/index_build_operation_metrics.js
@@ -74,10 +74,9 @@ assert.commandWorked(primaryDB.createCollection(collName));
assert.commandWorked(bulk.execute());
assertMetrics(primary, (metrics) => {
- // Each document insert counts as 1 unit plus 2 units (default unit size = 128) per oplog
- // entry.
- assert.eq(metrics[dbName].docBytesWritten, 167 * nDocs);
- assert.eq(metrics[dbName].docUnitsWritten, 3 * nDocs);
+ // Each document is 29 bytes and we do not count oplog writes.
+ assert.eq(metrics[dbName].docBytesWritten, 29 * nDocs);
+ assert.eq(metrics[dbName].docUnitsWritten, nDocs);
// The inserted keys will vary in size from 2 to 4 bytes depending on their value. Assert
// that the number of bytes fall within that range.