Skip to content

Commit

Permalink
fixup: log crypto hooks value in benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
addaleax committed Jun 19, 2024
1 parent 566bb4e commit a640933
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions test/benchmarks/bench.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit a640933

Please sign in to comment.