refactor: convert benchmarks code to ESM
[poolifier.git] / benchmarks / versus-external-pools / pool-threadwork.mjs
CommitLineData
8fca9288
JB
1// IMPORT LIBRARIES
2import { ThreadPool } from 'threadwork'
3// FINISH IMPORT LIBRARIES
4// IMPORT FUNCTION TO BENCH
5import functionToBench from './functions/function-to-bench.mjs'
6// FINISH IMPORT FUNCTION TO BENCH
7const size = parseInt(process.env.POOL_SIZE)
8
9export default new ThreadPool({ task: functionToBench, size })