]> zoso.dev Git - libnemo.git/commitdiff
Stress test block performance with PowGpu.
authorChris Duncan <chris@zoso.dev>
Sun, 5 Jan 2025 05:56:19 +0000 (21:56 -0800)
committerChris Duncan <chris@zoso.dev>
Sun, 5 Jan 2025 05:56:19 +0000 (21:56 -0800)
perf/block.perf.js

index 8818c5e04cf9d39f568f5fbeab49557531a75c53..f5476f0a8e70f2b494fd9e2f67db945bb94c77bc 100644 (file)
@@ -9,9 +9,9 @@ import { PowGpu, SendBlock } from '#dist/main.js'
 import 'nano-webgl-pow'
 
 await suite('Block performance', async () => {
-       const COUNT = 0x10
+       const COUNT = 0x200
 
-       await test(`Customized PoW: Time to calculate proof-of-work for a block hash ${COUNT} times`, async () => {
+       await skip(`Customized PoW: Time to calculate proof-of-work for a block hash ${COUNT} times`, async () => {
                const times = []
                const hashes = [
                        NANO_TEST_VECTORS.PRIVATE_0,
@@ -50,8 +50,7 @@ await suite('Block performance', async () => {
                        await block.pow()
                        const end = performance.now()
                        times.push(end - start)
-                       console.log(`${block.work} (${end - start} ms) ${block.previous}`)
-                       block.previous = 'BB569136FA05F8CBF65CEF2EDE368475B289C4477342976556BA4C0DDF216E45'
+                       console.log(`${block.work} (${end - start} ms)`)
                }
                const { total, arithmetic, harmonic, geometric } = average(times)
                console.log(`Total: ${total} ms`)