File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
test/benchmarks/driverBench Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -11,6 +11,7 @@ let bsonType = 'js-bson';
1111const { inspect } = require ( 'util' ) ;
1212const { writeFile } = require ( 'fs/promises' ) ;
1313const { makeParallelBenchmarks, makeSingleBench, makeMultiBench } = require ( '../mongoBench/suites' ) ;
14+ const { MONGODB_CLIENT_OPTIONS } = require ( './common' ) ;
1415
1516const hw = os . cpus ( ) ;
1617const ram = os . totalmem ( ) / 1024 ** 3 ;
@@ -90,7 +91,14 @@ benchmarkRunner
9091 info : {
9192 test_name : benchmarkName ,
9293 tags : [ bsonType ] ,
93- args : process . env . MONGODB_CLIENT_OPTIONS ?? ''
94+ // Args can only be a map of string -> int32. So if its a number leave it be,
95+ // if it is anything else test for truthiness and set to 1 or 0.
96+ args : Object . fromEntries (
97+ Object . entries ( MONGODB_CLIENT_OPTIONS ) . map ( ( [ key , value ] ) => [
98+ key ,
99+ typeof value === 'number' ? value | 0 : value ? 1 : 0
100+ ] )
101+ )
94102 } ,
95103 metrics : [ { name : 'megabytes_per_second' , value : result } ]
96104 } ;
You can’t perform that action at this time.
0 commit comments