Skip to content

Commit bd104a6

Browse files
addaleaxnbbeeken
authored andcommitted
fixup: log crypto hooks value in benchmarks
1 parent bb3b912 commit bd104a6

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

Diff for: test/benchmarks/bench.mjs

+7-6
Original file line numberDiff line numberDiff line change
@@ -114,19 +114,20 @@ function main() {
114114
].join('\n');
115115
console.log(systemInfo());
116116

117+
const mongoCryptOptions = { kmsProviders: BSON.serialize(kmsProviders) };
118+
if (!BENCH_WITH_NATIVE_CRYPTO) mongoCryptOptions.cryptoCallbacks = cryptoCallbacks;
119+
if (cryptSharedLibPath) mongoCryptOptions.cryptSharedLibPath = cryptSharedLibPath;
120+
121+
const mongoCrypt = new MongoCrypt(mongoCryptOptions);
122+
117123
console.log(
118124
`BenchmarkRunner is using ` +
119125
`libmongocryptVersion=${MongoCrypt.libmongocryptVersion}, ` +
126+
`cryptoHooks=${mongoCrypt.cryptoHooksProvider}, ` +
120127
`warmupSecs=${warmupSecs}, ` +
121128
`testInSecs=${testInSecs}`
122129
);
123130

124-
const mongoCryptOptions = { kmsProviders: BSON.serialize(kmsProviders) };
125-
if (!BENCH_WITH_NATIVE_CRYPTO) mongoCryptOptions.cryptoCallbacks = cryptoCallbacks;
126-
if (cryptSharedLibPath) mongoCryptOptions.cryptSharedLibPath = cryptSharedLibPath;
127-
128-
const mongoCrypt = new MongoCrypt(mongoCryptOptions);
129-
130131
const encrypted = createEncryptedDocument(mongoCrypt);
131132
const toDecrypt = BSON.serialize(encrypted);
132133

0 commit comments

Comments
 (0)