]> zoso.dev Git - libnemo.git/commitdiff
Add legacy wallet to performance test.
authorChris Duncan <chris@zoso.dev>
Sun, 1 Dec 2024 06:28:21 +0000 (22:28 -0800)
committerChris Duncan <chris@zoso.dev>
Sun, 1 Dec 2024 06:28:21 +0000 (22:28 -0800)
test/perf.mjs

index bfc2ae3955d59ee4e1b2debfe198d3a79ced327c..760be10a70381d5174e02397db0cb11f29007790 100644 (file)
@@ -1,6 +1,13 @@
 import * as N from '../dist/index.js'
 
+console.log(`wallet...`)
 const wallet = N.wallet.generate()
 let now = performance.now()
-const accounts = N.wallet.accounts(wallet.seed, 0, 0x2000)
-console.log(`${-now + (now = performance.now())} ms`)
+N.wallet.accounts(wallet.seed, 0, 0x2000)
+console.log(`${performance.now() - now} ms`)
+
+console.log(`wallet legacy...`)
+const walletLegacy = N.wallet.generateLegacy()
+now = performance.now()
+N.wallet.legacyAccounts(walletLegacy.seed, 0, 0x2000)
+console.log(`${performance.now() - now} ms`)