X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fcluster%2Fworker.js;h=0235afface236f2e2492e669636d74df37770c81;hb=3f7eb773a2c8775fa263b696b6a611e484e437a8;hp=9817322c2870864d3b18537eae6952e50afe43e1;hpb=bdacc2d25f190728221f7fb8c8cd2aba175cb18d;p=poolifier.git diff --git a/benchmarks/internal/cluster/worker.js b/benchmarks/internal/cluster/worker.js index 9817322c..0235affa 100644 --- a/benchmarks/internal/cluster/worker.js +++ b/benchmarks/internal/cluster/worker.js @@ -1,10 +1,13 @@ 'use strict' +const { isMaster } = require('cluster') const { ClusterWorker } = require('../../../lib/index') const { jsonIntegerSerialization } = require('../benchmark-utils') +const debug = false + function yourFunction (data) { jsonIntegerSerialization(1000) - // console.log('This is the main thread ' + isMaster) + debug === true && console.debug('This is the main thread ' + isMaster) return { ok: 1 } }