// IMPORT LIBRARIES
-const Piscina = require('piscina')
+import Piscina from 'piscina'
// FINISH IMPORT LIBRARIES
const size = parseInt(process.env.POOL_SIZE)
const iterations = parseInt(process.env.NUM_ITERATIONS)
}
const piscina = new Piscina({
- filename: './workers/piscina/function-to-bench-worker.js',
+ filename: './workers/piscina/function-to-bench-worker.mjs',
minThreads: size,
maxThreads: size * 3,
idleTimeout: 60000 // this is the same as poolifier default
process.exit()
}
-run()
+await run()