From 1ce9415af8505c1aae79fdce56f19a878ec3377d Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Tue, 7 Jan 2025 13:29:10 -0800 Subject: [PATCH] Set up canvas size for proper pow comparison testing. --- perf/block.perf.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/perf/block.perf.js b/perf/block.perf.js index d988e46..37c681c 100644 --- a/perf/block.perf.js +++ b/perf/block.perf.js @@ -90,6 +90,10 @@ await suite('Block performance', async () => { }) await test(`nano-webgl-pow: Time to calculate proof-of-work for a send block ${COUNT} times`, async () => { + //@ts-expect-error + window.NanoWebglPow.width = 256 * Math.max(1, Math.floor(navigator.hardwareConcurrency)) + //@ts-expect-error + window.NanoWebglPow.height = 256 * Math.max(1, Math.floor(navigator.hardwareConcurrency)) const times = [] for (let i = 0; i < COUNT; i++) { const start = performance.now() -- 2.34.1