From: Chris Duncan Date: Tue, 7 Jan 2025 21:06:21 +0000 (-0800) Subject: Restore all block performance tests. Fix PowGl execution. X-Git-Url: https://zoso.dev/?a=commitdiff_plain;h=0f2ecd806d20333538d79679b1c5b170ab5323ad;p=libnemo.git Restore all block performance tests. Fix PowGl execution. --- diff --git a/perf/block.perf.js b/perf/block.perf.js index d1ee578..d988e46 100644 --- a/perf/block.perf.js +++ b/perf/block.perf.js @@ -11,7 +11,7 @@ import 'nano-webgl-pow' await suite('Block performance', async () => { const COUNT = 0x20 - await skip(`PowGpu: Time to calculate proof-of-work for a block hash ${COUNT} times`, async () => { + await test(`PowGpu: Time to calculate proof-of-work for a block hash ${COUNT} times`, async () => { const times = [] const hashes = [ NANO_TEST_VECTORS.PRIVATE_0, @@ -49,7 +49,7 @@ await suite('Block performance', async () => { ] for (let i = 0; i < 6; i++) { const start = performance.now() - const work = await PowGl.find(hashes[i]) + const work = await PowGl.search(hashes[i]) const end = performance.now() times.push(end - start) console.log(`${work} (${end - start} ms) ${hashes[i]}`) @@ -63,7 +63,7 @@ await suite('Block performance', async () => { console.log(`Maximum: ${max} ms`) }) - await skip(`PowGpu: Time to calculate proof-of-work for a send block ${COUNT} times`, async () => { + await test(`libnemo: Time to calculate proof-of-work for a send block ${COUNT} times`, async () => { const times = [] const block = new SendBlock( NANO_TEST_VECTORS.SEND_BLOCK.account, @@ -89,7 +89,7 @@ await suite('Block performance', async () => { console.log(`Maximum: ${max} ms`) }) - await skip(`nano-webgl-pow: Time to calculate proof-of-work for a send block ${COUNT} times`, async () => { + await test(`nano-webgl-pow: Time to calculate proof-of-work for a send block ${COUNT} times`, async () => { const times = [] for (let i = 0; i < COUNT; i++) { const start = performance.now()