@@ -13,9 +13,7 @@ const {
1313 dropBucket,
1414 initCollection,
1515 initDb,
16- connectClient,
17- createCollection,
18- dropCollection
16+ connectClient
1917} = require ( '../../driverBench/common' ) ;
2018const { pipeline } = require ( 'stream/promises' ) ;
2119const { EJSON } = require ( 'bson' ) ;
@@ -36,6 +34,7 @@ async function clearTemporaryDirectory() {
3634 await Promise . all ( files . map ( file => rm ( file ) ) ) ;
3735}
3836
37+ // eslint-disable-next-line no-unused-vars
3938async function ldjsonMultiUpload ( ) {
4039 const directory = resolve ( benchmarkFileDirectory , 'ldjson_multi' ) ;
4140 const files = await readdir ( directory ) ;
@@ -64,6 +63,7 @@ async function ldjsonMultiUpload() {
6463 await Promise . all ( uploads ) ;
6564}
6665
66+ // eslint-disable-next-line no-unused-vars
6767async function ldjsonMultiExport ( ) {
6868 const skips = Array . from ( { length : 100 } , ( _ , index ) => index * 5000 ) ;
6969
@@ -113,43 +113,43 @@ async function gridfsMultiFileDownload() {
113113 * @returns Benchmark
114114 */
115115function 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+ // )
116152 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- )
153153 . benchmark ( 'gridfsMultiFileUpload' , benchmark =>
154154 // https://github.com/mongodb/specifications/blob/master/source/benchmarking/benchmarking.rst#gridfs-multi-file-upload
155155 benchmark
0 commit comments