mirror of https://github.com/webpack/webpack.git
fix: logic
This commit is contained in:
parent
154195fa4d
commit
59be3dc128
|
|
@ -500,7 +500,7 @@ const withCodSpeed = async (/** @type {import("tinybench").Bench} */ bench) => {
|
||||||
// Custom warmup
|
// Custom warmup
|
||||||
const samples = [];
|
const samples = [];
|
||||||
while (samples.length < bench.opts.iterations - 1) {
|
while (samples.length < bench.opts.iterations - 1) {
|
||||||
samples.push(await iterationAsync());
|
samples.push(await iterationAsync(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
await optimizeFunction(async () => {
|
await optimizeFunction(async () => {
|
||||||
|
|
@ -558,7 +558,7 @@ const withCodSpeed = async (/** @type {import("tinybench").Bench} */ bench) => {
|
||||||
// Custom warmup
|
// Custom warmup
|
||||||
const samples = [];
|
const samples = [];
|
||||||
while (samples.length < bench.opts.iterations - 1) {
|
while (samples.length < bench.opts.iterations - 1) {
|
||||||
samples.push(iteration());
|
samples.push(iteration(task));
|
||||||
}
|
}
|
||||||
|
|
||||||
fnOpts?.beforeEach?.call(task, "run");
|
fnOpts?.beforeEach?.call(task, "run");
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue