Skip to content

Commit

Permalink
fix(benchmark): update tinybench usage to new warmup API for v3.0 com…
Browse files Browse the repository at this point in the history
…patibility
  • Loading branch information
JaoodxD committed Feb 16, 2025
1 parent 7909a60 commit 9fcdefb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions benchmark/piscina-queue-comparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ const { resolve } = require('node:path');

const QUEUE_SIZE = 100_000;

const bench = new Bench({ time: 100 });
const bench = new Bench({ time: 100, warmup: true });

bench
.add('Piscina with ArrayTaskQueue', async () => {
Expand Down Expand Up @@ -35,7 +35,6 @@ bench
});

(async () => {
await bench.warmup();
await bench.run();

console.table(bench.table());
Expand Down
3 changes: 1 addition & 2 deletions benchmark/queue-comparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const { ArrayTaskQueue, FixedQueue } = require('..');

const QUEUE_SIZE = 100_000;

const bench = new Bench({ time: 100 });
const bench = new Bench({ time: 100, warmup: true });

bench
.add('ArrayTaskQueue full push + full shift', async () => {
Expand All @@ -26,7 +26,6 @@ bench
});

(async () => {
await bench.warmup();
await bench.run();

console.table(bench.table());
Expand Down

0 comments on commit 9fcdefb

Please sign in to comment.