From: Chris Duncan Date: Sun, 5 Jan 2025 05:56:19 +0000 (-0800) Subject: Stress test block performance with PowGpu. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=10d63470615ca2a912484ebe505cc9f5d399ae44;p=libnemo.git Stress test block performance with PowGpu. --- diff --git a/perf/block.perf.js b/perf/block.perf.js index 8818c5e..f5476f0 100644 --- a/perf/block.perf.js +++ b/perf/block.perf.js @@ -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`)