Switch eslint-plugin-node to supported eslint-plugin-n
[poolifier.git] / benchmarks / versus-external-pools / fixed-threadwork.js
CommitLineData
7f685093 1// IMPORT LIBRARIES
73cda448 2const threadPool = require('./pool-threadwork')
7f685093 3// FINISH IMPORT LIBRARIES
79e7d368 4const iterations = Number(process.env.NUM_ITERATIONS)
7f685093
JB
5const data = {
6 test: 'MYBENCH',
7a6a0a96
JB
7 taskType: process.env.TASK_TYPE,
8 taskSize: process.env.TASK_SIZE
7f685093
JB
9}
10
7f685093
JB
11async function run () {
12 const promises = []
13 for (let i = 0; i < iterations; i++) {
14 promises.push(threadPool.run(data))
15 }
16 await Promise.all(promises)
2f8c5b5c 17 // eslint-disable-next-line n/no-process-exit
7f685093
JB
18 process.exit()
19}
20
21run()