@@ -13,7 +13,9 @@ const {
13
13
dropBucket,
14
14
initCollection,
15
15
initDb,
16
- connectClient
16
+ connectClient,
17
+ dropCollection,
18
+ createCollection
17
19
} = require ( '../../driverBench/common' ) ;
18
20
const { pipeline } = require ( 'stream/promises' ) ;
19
21
const { EJSON } = require ( 'bson' ) ;
@@ -34,7 +36,6 @@ async function clearTemporaryDirectory() {
34
36
await Promise . all ( files . map ( file => rm ( file ) ) ) ;
35
37
}
36
38
37
- // eslint-disable-next-line no-unused-vars
38
39
async function ldjsonMultiUpload ( ) {
39
40
const directory = resolve ( benchmarkFileDirectory , 'ldjson_multi' ) ;
40
41
const files = await readdir ( directory ) ;
@@ -63,7 +64,6 @@ async function ldjsonMultiUpload() {
63
64
await Promise . all ( uploads ) ;
64
65
}
65
66
66
- // eslint-disable-next-line no-unused-vars
67
67
async function ldjsonMultiExport ( ) {
68
68
const skips = Array . from ( { length : 100 } , ( _ , index ) => index * 5000 ) ;
69
69
@@ -113,43 +113,43 @@ async function gridfsMultiFileDownload() {
113
113
* @returns Benchmark
114
114
*/
115
115
function makeParallelBenchmarks ( suite ) {
116
- // .benchmark('ldjsonMultiFileUpload', benchmark =>
117
- // // https://github.com/mongodb/specifications/blob/master/source/benchmarking/benchmarking.rst#ldjson-multi-file-import
118
- // benchmark
119
- // .taskSize(565)
120
- // .setup(makeClient)
121
- // .setup(connectClient)
122
- // .setup(initDb)
123
- // .setup(dropDb)
124
- // .beforeTask(initCollection)
125
- // .beforeTask(dropCollection)
126
- // .beforeTask(createCollection)
127
- // .task(ldjsonMultiUpload)
128
- // .teardown(dropDb)
129
- // .teardown(disconnectClient)
130
- // )
131
- // .benchmark('ldjsonMultiFileExport', benchmark =>
132
- // // https://github.com/mongodb/specifications/blob/master/source/benchmarking/benchmarking.rst#ldjson-multi-file-export
133
- // benchmark
134
- // .taskSize(565)
135
- // .setup(makeClient)
136
- // .setup(connectClient)
137
- // .setup(initDb)
138
- // .setup(dropDb)
139
- // .beforeTask(initCollection)
140
- // .beforeTask(dropCollection)
141
- // .beforeTask(createCollection)
142
- // .beforeTask(ldjsonMultiUpload)
143
- // .beforeTask(initTemporaryDirectory)
144
- // .task(ldjsonMultiExport)
145
- // .afterTask(clearTemporaryDirectory)
146
- // .teardown(dropDb)
147
- // .teardown(async function () {
148
- // await rm(this.temporaryDirectory, { recursive: true, force: true });
149
- // })
150
- // .teardown(disconnectClient)
151
- // )
152
116
return suite
117
+ . benchmark ( 'ldjsonMultiFileUpload' , benchmark =>
118
+ // https://github.com/mongodb/specifications/blob/master/source/benchmarking/benchmarking.rst#ldjson-multi-file-import
119
+ benchmark
120
+ . taskSize ( 565 )
121
+ . setup ( makeClient )
122
+ . setup ( connectClient )
123
+ . setup ( initDb )
124
+ . setup ( dropDb )
125
+ . beforeTask ( initCollection )
126
+ . beforeTask ( dropCollection )
127
+ . beforeTask ( createCollection )
128
+ . task ( ldjsonMultiUpload )
129
+ . teardown ( dropDb )
130
+ . teardown ( disconnectClient )
131
+ )
132
+ . benchmark ( 'ldjsonMultiFileExport' , benchmark =>
133
+ // https://github.com/mongodb/specifications/blob/master/source/benchmarking/benchmarking.rst#ldjson-multi-file-export
134
+ benchmark
135
+ . taskSize ( 565 )
136
+ . setup ( makeClient )
137
+ . setup ( connectClient )
138
+ . setup ( initDb )
139
+ . setup ( dropDb )
140
+ . beforeTask ( initCollection )
141
+ . beforeTask ( dropCollection )
142
+ . beforeTask ( createCollection )
143
+ . beforeTask ( ldjsonMultiUpload )
144
+ . beforeTask ( initTemporaryDirectory )
145
+ . task ( ldjsonMultiExport )
146
+ . afterTask ( clearTemporaryDirectory )
147
+ . teardown ( dropDb )
148
+ . teardown ( async function ( ) {
149
+ await rm ( this . temporaryDirectory , { recursive : true , force : true } ) ;
150
+ } )
151
+ . teardown ( disconnectClient )
152
+ )
153
153
. benchmark ( 'gridfsMultiFileUpload' , benchmark =>
154
154
// https://github.com/mongodb/specifications/blob/master/source/benchmarking/benchmarking.rst#gridfs-multi-file-upload
155
155
benchmark
0 commit comments