mirror of https://github.com/nucypher/nucypher.git
Measure decryption time in simple testnet script
parent
2b4fdb1426
commit
bb7e4864c7
|
@ -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")
|
||||
|
|
Loading…
Reference in New Issue