@@ -13,9 +13,7 @@ const {
13
13
dropBucket,
14
14
initCollection,
15
15
initDb,
16
- connectClient,
17
- createCollection,
18
- dropCollection
16
+ connectClient
19
17
} = require ( '../../driverBench/common' ) ;
20
18
const { pipeline } = require ( 'stream/promises' ) ;
21
19
const { EJSON } = require ( 'bson' ) ;
@@ -36,6 +34,7 @@ async function clearTemporaryDirectory() {
36
34
await Promise . all ( files . map ( file => rm ( file ) ) ) ;
37
35
}
38
36
37
+ // eslint-disable-next-line no-unused-vars
39
38
async function ldjsonMultiUpload ( ) {
40
39
const directory = resolve ( benchmarkFileDirectory , 'ldjson_multi' ) ;
41
40
const files = await readdir ( directory ) ;
@@ -64,6 +63,7 @@ async function ldjsonMultiUpload() {
64
63
await Promise . all ( uploads ) ;
65
64
}
66
65
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
+ // )
116
152
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