From 7677e470cf805b7228ef0942f2646cbc8fe9c03b Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Mon, 16 Jun 2025 11:45:58 -0700 Subject: [PATCH] Change logging on test page score function. --- test/index.html | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/test/index.html b/test/index.html index ca0a5b7..f56d9f6 100644 --- a/test/index.html +++ b/test/index.html @@ -178,10 +178,10 @@ SPDX-License-Identifier: GPL-3.0-or-later } export async function score (runs, size, difficulty, effort, api) { + console.log(`%cNanoPow ${api}`, 'color:green', `Calculate truncated harmonic mean of the truncated arithmetic rate across ${runs} runs of ${size} samples.`) const rates = [] for (let i = 0; i < runs; i++) { const times = [] - console.log(`%cNanoPow ${api}`, 'color:green', `Calculate proof-of-work for ${runs} unique send block hashes`) for (let j = 0; j < size; j++) { document.getElementById('status').innerHTML = `SCORING IN PROGRESS. THIS WILL TAKE A LONG TIME. ${i}/${size} ${j}/${runs}
` const hash = random() @@ -197,8 +197,6 @@ SPDX-License-Identifier: GPL-3.0-or-later times.push(performance.now() - start) } const results = Object.values(average(times))[0] - console.log(times) - console.log(results) const { truncatedRate } = results rates.push(truncatedRate) document.getElementById('output').innerHTML += `Benchmark ${i + 1} score: ${truncatedRate} wps
` @@ -269,7 +267,7 @@ SPDX-License-Identifier: GPL-3.0-or-later const effort = document.getElementById('effort') const api = document.getElementById('api') const isOutputShown = document.getElementById('isOutputShown') - score(+runs.value, +size.value, difficulty.value, +effort.value, api.value, isOutputShown.checked) + score(+runs.value, +size.value, difficulty.value, +effort.value, api.value) .then(() => event.target.disabled = false) } -- 2.47.3