Report some code cleanups from work in progress PR
[poolifier.git] / benchmarks / internal / cluster / worker.js
index b4d54fca9976e65bbbb76da3ff5d54a4673815ff..9817322c2870864d3b18537eae6952e50afe43e1 100644 (file)
@@ -1,13 +1,9 @@
 'use strict'
 const { ClusterWorker } = 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 ' + isMaster)
   return { ok: 1 }
 }