Skip to content

Commit e76d10f

Browse files
committed
test: add (temporary) logging for unreliable test
Refs: nodejs#25984
1 parent d2c29bd commit e76d10f

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

test/pummel/test-crypto-timing-safe-equal-benchmarks.js

+4
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ function runOneBenchmark(...args) {
2424
}
2525

2626
function getTValue(compareFunc) {
27+
console.log(compareFunc.name);
2728
const numTrials = 1e5;
2829
const bufSize = 10000;
2930
// Perform benchmarks to verify that timingSafeEqual is actually timing-safe.
@@ -32,6 +33,9 @@ function getTValue(compareFunc) {
3233
const rawUnequalBenches = Array(numTrials);
3334

3435
for (let i = 0; i < numTrials; i++) {
36+
if (i % 1000 === 0) {
37+
console.log(i);
38+
}
3539
if (Math.random() < 0.5) {
3640
// First benchmark: comparing two equal buffers
3741
rawEqualBenches[i] = runOneBenchmark(compareFunc, 'A', 'A', bufSize);

0 commit comments

Comments
 (0)