Skip to content

Commit 1cca029

Browse files
committed
Merge branch 'fixSkip'
2 parents 872d18e + 14dc7e2 commit 1cca029

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

frameworks/solid/src/benchmark.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,9 @@ const Benchmark = () => {
181181
results.update = `${updateAvg.toFixed(2)}ms ±${updateSpread.toFixed(2)}`;
182182

183183
await createMany(1000);
184-
await warmup(updateMany, [1000, 10], 5);
184+
await warmup(updateMany, 1000, 10);
185185
await createMany(1000);
186-
const { average: skipNthAvg, spread: skipNthSpread } = await run(updateMany, [1000, 10], 5);
186+
const { average: skipNthAvg, spread: skipNthSpread } = await run(updateMany, 1000, 10);
187187
results.skipNth = `${skipNthAvg.toFixed(2)}ms ±${skipNthSpread.toFixed(2)}`;
188188

189189
await createMany(1000);

shared/utils/run.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export const run = (fn, argument, count = 5) => {
4141
const runTest = (fn, argument, count) => {
4242
// check if arguments is an array
4343
if (!Array.isArray(argument)) {
44-
argument = [argument];
44+
argument = [argument, count];
4545
}
4646

4747
fn(...argument).then((res) => {

shared/utils/warmup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ export const warmup = (fn, argument, count = 5) => {
2222
const runWarmup = (fn, argument, count) => {
2323
// check if arguments is an array
2424
if (!Array.isArray(argument)) {
25-
argument = [argument];
25+
argument = [argument, count];
2626
}
2727

2828
fn(...argument).then(() => {

0 commit comments

Comments
 (0)