]> zoso.dev Git - libnemo.git/commitdiff
Add perf logging to test webpage.
authorChris Duncan <chris@zoso.dev>
Mon, 2 Dec 2024 03:01:05 +0000 (19:01 -0800)
committerChris Duncan <chris@zoso.dev>
Mon, 2 Dec 2024 03:01:05 +0000 (19:01 -0800)
test.html

index 1f13a6e3d88960e9d97b7f6109ea3b9f189c5116..91262c1e5678a9aaa3ebd9054579d4d34b07db86 100644 (file)
--- a/test.html
+++ b/test.html
@@ -7,7 +7,9 @@
                const bipWallet = await libnemo.Bip44Wallet.create('test')
                await bipWallet.unlock('test')
                console.log(bipWallet.mnemonic)
+               let now = performance.now()
                const bipAccounts = await bipWallet.accounts(0, 0x2000)
+               console.log(`bip44 done: ${performance.now() - now} ms`)
                const bipAccount = bipAccounts[0]
                console.log(bipAccount.privateKey)
                console.log(bipAccount.publicKey)
@@ -17,7 +19,9 @@
                const blakeWallet = await libnemo.Blake2bWallet.create('test')
                await blakeWallet.unlock('test')
                console.log(blakeWallet.mnemonic)
+               now = performance.now()
                const blakeAccounts = await blakeWallet.accounts(0, 0x2000)
+               console.log(`blake2b done: ${performance.now() - now} ms`)
                const blakeAccount = blakeAccounts[0]
                console.log(blakeAccount.privateKey)
                console.log(blakeAccount.publicKey)