diff options
author | Brian DeLeonardis <brian.deleonardis@mongodb.com> | 2020-11-10 23:43:42 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-11-11 21:36:30 +0000 |
commit | b457c077f0e7688d890885619eb33e73f4a65219 (patch) | |
tree | 78b7e6c16aea243336de27c02ce33e06e4921fb9 /jstests/noPassthrough/index_build_operation_metrics.js | |
parent | cb0deac8d70bd1927546f751526441daaabd55ec (diff) | |
download | mongo-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.js | 7 |
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. |