fix: ensure piscina properly simulate fixed pool
authorJérôme Benoit <jerome.benoit@sap.com>
Mon, 19 Jun 2023 12:27:29 +0000 (14:27 +0200)
committerJérôme Benoit <jerome.benoit@sap.com>
Mon, 19 Jun 2023 12:27:29 +0000 (14:27 +0200)
Signed-off-by: Jérôme Benoit <jerome.benoit@sap.com>
benchmarks/versus-external-pools/fixed-piscina.js
benchmarks/versus-external-pools/fixed-tinypool.mjs

index 8a92dbea5b6a7709f8b2df90b77f7a8ce170d394..5ddc612f642bea56b4663116c9f5ba860bfd84cb 100644 (file)
@@ -12,6 +12,7 @@ const data = {
 const piscina = new Piscina({
   filename: './workers/piscina/function-to-bench-worker.js',
   minThreads: size,
+  maxThreads: size,
   idleTimeout: 60000 // this is the same as poolifier default
 })
 
index 223c0f005837673d4f69a4d468c1938a67d929a6..c6e7c04996964aaf1c6f51940c698a336aff2ed1 100644 (file)
@@ -12,6 +12,7 @@ const data = {
 const tinypool = new Tinypool({
   filename: './workers/tinypool/function-to-bench-worker.js',
   minThreads: size,
+  maxThreads: size,
   idleTimeout: 60000 // this is the same as poolifier default
 })