X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fthread%2Fworker.js;h=6437c0afe6e1f6a06a9383b9855e6b3cb0fb2a8d;hb=b3432a63039e7cb70c0448da5518690e457cd47e;hp=2ec5f4c2a54ff25550029e28e6ad491c61934bb3;hpb=be0676b3936d75f22ce55b0f71a1fb03d008a01c;p=poolifier.git diff --git a/benchmarks/internal/thread/worker.js b/benchmarks/internal/thread/worker.js index 2ec5f4c2..6437c0af 100644 --- a/benchmarks/internal/thread/worker.js +++ b/benchmarks/internal/thread/worker.js @@ -1,13 +1,9 @@ 'use strict' const { ThreadWorker } = require('../../../lib/index') +const { jsonIntegerSerialization } = require('../benchmark-utils') function yourFunction (data) { - for (let i = 0; i <= 1000; i++) { - const o = { - a: i - } - JSON.stringify(o) - } + jsonIntegerSerialization(1000) // console.log('This is the main thread ' + isMainThread) return { ok: 1 } }