fix: logic

This commit is contained in:
alexander-akait 2025-09-29 22:58:58 +03:00
parent 154195fa4d
commit 59be3dc128
1 changed files with 2 additions and 2 deletions

View File

@ -500,7 +500,7 @@ const withCodSpeed = async (/** @type {import("tinybench").Bench} */ bench) => {
// Custom warmup
const samples = [];
while (samples.length < bench.opts.iterations - 1) {
samples.push(await iterationAsync());
samples.push(await iterationAsync(task));
}
await optimizeFunction(async () => {
@ -558,7 +558,7 @@ const withCodSpeed = async (/** @type {import("tinybench").Bench} */ bench) => {
// Custom warmup
const samples = [];
while (samples.length < bench.opts.iterations - 1) {
samples.push(iteration());
samples.push(iteration(task));
}
fnOpts?.beforeEach?.call(task, "run");