From a6409337746de9eecd51eba78bf4ce606730a056 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Wed, 19 Jun 2024 16:40:25 +0200 Subject: [PATCH] fixup: log crypto hooks value in benchmarks --- test/benchmarks/bench.mjs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/test/benchmarks/bench.mjs b/test/benchmarks/bench.mjs index 7062a5d..37cc459 100644 --- a/test/benchmarks/bench.mjs +++ b/test/benchmarks/bench.mjs @@ -114,19 +114,20 @@ function main() { ].join('\n'); console.log(systemInfo()); + const mongoCryptOptions = { kmsProviders: BSON.serialize(kmsProviders) }; + if (!BENCH_WITH_NATIVE_CRYPTO) mongoCryptOptions.cryptoCallbacks = cryptoCallbacks; + if (cryptSharedLibPath) mongoCryptOptions.cryptSharedLibPath = cryptSharedLibPath; + + const mongoCrypt = new MongoCrypt(mongoCryptOptions); + console.log( `BenchmarkRunner is using ` + `libmongocryptVersion=${MongoCrypt.libmongocryptVersion}, ` + + `cryptoHooks=${mongoCrypt.cryptoHooksProvider}, ` + `warmupSecs=${warmupSecs}, ` + `testInSecs=${testInSecs}` ); - const mongoCryptOptions = { kmsProviders: BSON.serialize(kmsProviders) }; - if (!BENCH_WITH_NATIVE_CRYPTO) mongoCryptOptions.cryptoCallbacks = cryptoCallbacks; - if (cryptSharedLibPath) mongoCryptOptions.cryptSharedLibPath = cryptSharedLibPath; - - const mongoCrypt = new MongoCrypt(mongoCryptOptions); - const encrypted = createEncryptedDocument(mongoCrypt); const toDecrypt = BSON.serialize(encrypted);