Skip to content

Commit

Permalink
test: add toArray perf benchmark (#4172)
Browse files Browse the repository at this point in the history
Co-authored-by: Neal Beeken <[email protected]>
  • Loading branch information
aditi-khare-mongoDB and nbbeeken authored Jul 9, 2024
1 parent 9a5e611 commit fb442ed
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/benchmarks/mongoBench/suites/multiBench.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,22 @@ function makeMultiBench(suite) {
})
.teardown(dropDb)
.teardown(disconnectClient)
)
.benchmark('findManyAndToArray', benchmark =>
benchmark
.taskSize(16.22)
.setup(makeLoadJSON('tweet.json'))
.setup(makeClient)
.setup(connectClient)
.setup(initDb)
.setup(dropDb)
.setup(initCollection)
.setup(makeLoadTweets(false))
.task(async function () {
await this.collection.find({}).toArray();
})
.teardown(dropDb)
.teardown(disconnectClient)
);
}

Expand Down

0 comments on commit fb442ed

Please sign in to comment.