Skip to content

Commit

Permalink
chore: add log for timings
Browse files Browse the repository at this point in the history
  • Loading branch information
immortal-tofu committed Dec 5, 2024
1 parent 68a5163 commit 87360e2
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion src/sdk/encrypt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,20 @@ export const createEncryptedInput =
};
},
async encrypt() {
let start = Date.now();
const ciphertext = await this._prove();
return this._verify(ciphertext);
console.log(
`Encrypting and proving in ${
Math.round((Date.now() - start) / 100) / 10
}s`,
);

start = Date.now();
const verification = await this._verify(ciphertext);
console.log(
`Verifying in ${Math.round((Date.now() - start) / 100) / 10}s`,
);
return verification;
},
};
};
Expand Down

0 comments on commit 87360e2

Please sign in to comment.