22
33const MongoBench = require ( '../mongoBench' ) ;
44const os = require ( 'node:os' ) ;
5+ const util = require ( 'node:util' ) ;
56const process = require ( 'node:process' ) ;
67
78const Runner = MongoBench . Runner ;
@@ -11,9 +12,17 @@ let bsonType = 'js-bson';
1112
1213const { writeFile } = require ( 'fs/promises' ) ;
1314const {
14- makeParallelBenchmarks /* makeSingleBench, makeMultiBench*/
15+ makeParallelBenchmarks /* makeSingleBench, makeMultiBench */
1516} = 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' ) ;
1726
1827const hw = os . cpus ( ) ;
1928const ram = os . totalmem ( ) / 1024 ** 3 ;
@@ -26,7 +35,10 @@ const systemInfo = () =>
2635 `- arch: ${ os . arch ( ) } ` ,
2736 `- os: ${ process . platform } (${ os . release ( ) } )` ,
2837 `- 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`
3042 ] . join ( '\n' ) ;
3143console . log ( systemInfo ( ) ) ;
3244
@@ -57,18 +69,18 @@ benchmarkRunner
5769 ] ) ;
5870
5971 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,
6375 microBench . parallel . gridfsMultiFileDownload ,
6476 microBench . parallel . ldjsonMultiFileExport
6577 ] ) ;
6678 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,
7284 microBench . parallel . ldjsonMultiFileUpload ,
7385 microBench . parallel . gridfsMultiFileUpload
7486 ] ) ;
@@ -111,6 +123,6 @@ benchmarkRunner
111123 return writeFile ( 'results.json' , results ) ;
112124 } )
113125 . catch ( err => {
114- console . error ( 'failure: ' , err . name , err . message ) ;
126+ console . error ( 'failure: ' , err . name , err . message , err . stack ) ;
115127 process . exit ( 1 ) ;
116128 } ) ;
0 commit comments