Report some code cleanups from work in progress PR
[poolifier.git] / benchmarks / internal / thread / worker.js
index f5f36ed88b82cbfef176e0cbdb1d9969d9a7af1c..6437c0afe6e1f6a06a9383b9855e6b3cb0fb2a8d 100644 (file)
@@ -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 }
 }