2
2
3
3
const MongoBench = require ( '../mongoBench' ) ;
4
4
const os = require ( 'node:os' ) ;
5
+ const util = require ( 'node:util' ) ;
5
6
const process = require ( 'node:process' ) ;
6
7
7
8
const Runner = MongoBench . Runner ;
@@ -11,9 +12,17 @@ let bsonType = 'js-bson';
11
12
12
13
const { writeFile } = require ( 'fs/promises' ) ;
13
14
const {
14
- makeParallelBenchmarks /* makeSingleBench, makeMultiBench*/
15
+ makeParallelBenchmarks /* makeSingleBench, makeMultiBench */
15
16
} = require ( '../mongoBench/suites' ) ;
16
- const { MONGODB_CLIENT_OPTIONS } = require ( './common' ) ;
17
+ const {
18
+ MONGODB_CLIENT_OPTIONS ,
19
+ MONGODB_DRIVER_PATH ,
20
+ MONGODB_DRIVER_VERSION ,
21
+ MONGODB_DRIVER_REVISION ,
22
+ MONGODB_BSON_PATH ,
23
+ MONGODB_BSON_VERSION ,
24
+ MONGODB_BSON_REVISION
25
+ } = require ( './common' ) ;
17
26
18
27
const hw = os . cpus ( ) ;
19
28
const ram = os . totalmem ( ) / 1024 ** 3 ;
@@ -26,7 +35,10 @@ const systemInfo = () =>
26
35
`- arch: ${ os . arch ( ) } ` ,
27
36
`- os: ${ process . platform } (${ os . release ( ) } )` ,
28
37
`- ram: ${ platform . ram } ` ,
29
- `- node: ${ process . version } \n`
38
+ `- node: ${ process . version } ` ,
39
+ `- driver: ${ MONGODB_DRIVER_VERSION } (${ MONGODB_DRIVER_REVISION } ): ${ MONGODB_DRIVER_PATH } ` ,
40
+ ` - options ${ util . inspect ( MONGODB_CLIENT_OPTIONS ) } ` ,
41
+ `- bson: ${ MONGODB_BSON_VERSION } (${ MONGODB_BSON_REVISION } ): (${ MONGODB_BSON_PATH } )\n`
30
42
] . join ( '\n' ) ;
31
43
console . log ( systemInfo ( ) ) ;
32
44
@@ -57,18 +69,18 @@ benchmarkRunner
57
69
] ) ;
58
70
59
71
const readBench = average ( [
60
- microBench . singleBench . findOne ,
61
- microBench . multiBench . findManyAndEmptyCursor ,
62
- microBench . multiBench . gridFsDownload ,
72
+ // microBench.singleBench.findOne,
73
+ // microBench.multiBench.findManyAndEmptyCursor,
74
+ // microBench.multiBench.gridFsDownload,
63
75
microBench . parallel . gridfsMultiFileDownload ,
64
76
microBench . parallel . ldjsonMultiFileExport
65
77
] ) ;
66
78
const writeBench = average ( [
67
- microBench . singleBench . smallDocInsertOne ,
68
- microBench . singleBench . largeDocInsertOne ,
69
- microBench . multiBench . smallDocBulkInsert ,
70
- microBench . multiBench . largeDocBulkInsert ,
71
- microBench . multiBench . gridFsUpload ,
79
+ // microBench.singleBench.smallDocInsertOne,
80
+ // microBench.singleBench.largeDocInsertOne,
81
+ // microBench.multiBench.smallDocBulkInsert,
82
+ // microBench.multiBench.largeDocBulkInsert,
83
+ // microBench.multiBench.gridFsUpload,
72
84
microBench . parallel . ldjsonMultiFileUpload ,
73
85
microBench . parallel . gridfsMultiFileUpload
74
86
] ) ;
@@ -111,6 +123,6 @@ benchmarkRunner
111
123
return writeFile ( 'results.json' , results ) ;
112
124
} )
113
125
. catch ( err => {
114
- console . error ( 'failure: ' , err . name , err . message ) ;
126
+ console . error ( 'failure: ' , err . name , err . message , err . stack ) ;
115
127
process . exit ( 1 ) ;
116
128
} ) ;
0 commit comments