if (count > 2 && i > (count * 0.1) && i < (count * 0.9)) truncated += times[i]
}
const averages = {
- Count: `${count} dispatches`,
- Total: `${sum} ms`,
- Rate: `${count / sum * 1000} dispatches/second`,
- Minimum: `${min} ms`,
- Maximum: `${max} ms`,
- Arithmetic: `${sum / count} ms`,
- Truncated: `${truncated / count} ms`,
- Harmonic: `${count / reciprocals} ms`,
- Geometric: `${Math.exp(logarithms / count)} ms`
+ "Count (dispatches)": count,
+ "Total (ms)": sum,
+ "Rate (d/s)": count / sum * 1000,
+ "Minimum (ms)": min,
+ "Maximum (ms)": max,
+ "Arithmetic Mean (ms)": sum / count,
+ "Truncated Mean (ms)": truncated / count,
+ "Harmonic Mean (ms)": count / reciprocals,
+ "Geometric Mean (ms)": Math.exp(logarithms / count)
}
console.table(averages)
}
start = performance.now()
const random = Math.floor(Math.random() * 0xffffffff)
const seed = (BigInt(random) << 32n) | BigInt(random)
- const data = await this.#dispatch(this.#searchPipeline, seed, hash, threshold, effort * 0x100)
+ const data = await this.#dispatch(this.#searchPipeline, seed, hash, threshold, effort * 0x200)
nonce = data.getBigUint64(0, true)
this.#busy = !data.getUint32(8)
times.push(performance.now() - start)