Run PR CI on all branches
[poolifier.git] / benchmarks / versus-external-pools / functions / function-to-bench.js
CommitLineData
9f7e7a99 1module.exports = function (data) {
8d3782fa 2 if (data.taskType === 'CPU_INTENSIVE') {
144f78e0 3 // CPU intensive task
6e9d10db 4 for (let i = 0; i < 5000; i++) {
9f7e7a99 5 const o = {
6 a: i
7 }
8 JSON.stringify(o)
9 }
10 return { ok: 1 }
11 } else {
12 throw new Error('Please specify the task type')
13 }
14}