Tests: be more strict on number expectation
[poolifier.git] / benchmarks / versus-external-pools / fixed-piscina.js
index d01644445a4dff824b3d8df8dfcf119ae2d9f6fb..c89a951d2c70be00147764eeba7e78eece53bccd 100644 (file)
@@ -1,8 +1,8 @@
 // IMPORT LIBRARIES
 const Piscina = require('piscina')
 // FINISH IMPORT LIBRARIES
-const size = process.env.POOL_SIZE
-const iterations = process.env.NUM_ITERATIONS
+const size = Number(process.env.POOL_SIZE)
+const iterations = Number(process.env.NUM_ITERATIONS)
 const data = {
   test: 'MYBENCH',
   taskType: process.env['TASK_TYPE']
@@ -10,8 +10,8 @@ const data = {
 
 const piscina = new Piscina({
   filename: './workers/piscina/function-to-bench-worker.js',
-  minThreads: Number(size),
-  idleTimeout: 1000 * 60 // this is the same as poolifier default
+  minThreads: size,
+  idleTimeout: 60000 // this is the same as poolifier default
 })
 
 async function run () {