From 9fcdefb653c9bd44551df900573582b864ee20f6 Mon Sep 17 00:00:00 2001 From: JaoodxD Date: Sun, 16 Feb 2025 17:49:33 +0200 Subject: [PATCH] fix(benchmark): update tinybench usage to new warmup API for v3.0 compatibility --- benchmark/piscina-queue-comparison.js | 3 +-- benchmark/queue-comparison.js | 3 +-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/benchmark/piscina-queue-comparison.js b/benchmark/piscina-queue-comparison.js index edca7394..35bac6aa 100644 --- a/benchmark/piscina-queue-comparison.js +++ b/benchmark/piscina-queue-comparison.js @@ -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 () => { @@ -35,7 +35,6 @@ bench }); (async () => { - await bench.warmup(); await bench.run(); console.table(bench.table()); diff --git a/benchmark/queue-comparison.js b/benchmark/queue-comparison.js index a00335e5..b18830a3 100644 --- a/benchmark/queue-comparison.js +++ b/benchmark/queue-comparison.js @@ -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 () => { @@ -26,7 +26,6 @@ bench }); (async () => { - await bench.warmup(); await bench.run(); console.table(bench.table());