Skip to content

Commit fb442ed

Browse files
test: add toArray perf benchmark (#4172)
Co-authored-by: Neal Beeken <[email protected]>
1 parent 9a5e611 commit fb442ed

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

test/benchmarks/mongoBench/suites/multiBench.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,22 @@ function makeMultiBench(suite) {
139139
})
140140
.teardown(dropDb)
141141
.teardown(disconnectClient)
142+
)
143+
.benchmark('findManyAndToArray', benchmark =>
144+
benchmark
145+
.taskSize(16.22)
146+
.setup(makeLoadJSON('tweet.json'))
147+
.setup(makeClient)
148+
.setup(connectClient)
149+
.setup(initDb)
150+
.setup(dropDb)
151+
.setup(initCollection)
152+
.setup(makeLoadTweets(false))
153+
.task(async function () {
154+
await this.collection.find({}).toArray();
155+
})
156+
.teardown(dropDb)
157+
.teardown(disconnectClient)
142158
);
143159
}
144160

0 commit comments

Comments
 (0)