Measure decryption time in simple testnet script

pull/3284/head
David Núñez 2023-10-13 14:33:54 +02:00
parent 2b4fdb1426
commit bb7e4864c7
No known key found for this signature in database
GPG Key ID: 53A9D83EF4C6332A
1 changed files with 5 additions and 0 deletions

View File

@ -1,4 +1,5 @@
import os
import time
from nucypher_core.ferveo import DkgPublicKey
@ -85,10 +86,14 @@ bob = Bob(
bob.start_learning_loop(now=True)
start = time.time()
cleartext = bob.threshold_decrypt(
threshold_message_kit=threshold_message_kit,
)
end = time.time()
cleartext = bytes(cleartext)
print(f"\nCleartext: {cleartext.decode()}")
assert message == cleartext
print(f"\nDecryption time: {end - start} seconds")