X-Git-Url: https://git.piment-noir.org/?a=blobdiff_plain;f=benchmarks%2Finternal%2Fcluster-worker.mjs;h=69a7ad15cae0ada671f3e4f8ef1261305d26e51a;hb=aed302d456407817a368e3f743020474b60facd2;hp=fee9d3f8b5cbddccd17d58dc4b95cbaf2a5cb8d8;hpb=1c132fec1844432e7bfea1bd5d384a9880b91dbb;p=poolifier.git diff --git a/benchmarks/internal/cluster-worker.mjs b/benchmarks/internal/cluster-worker.mjs index fee9d3f8..69a7ad15 100644 --- a/benchmarks/internal/cluster-worker.mjs +++ b/benchmarks/internal/cluster-worker.mjs @@ -1,11 +1,11 @@ -import { isPrimary } from 'cluster' +import { isPrimary } from 'node:cluster' import { ClusterWorker } from '../../lib/index.mjs' import { executeTaskFunction } from '../benchmarks-utils.mjs' import { TaskFunctions } from '../benchmarks-types.mjs' const debug = false -const taskFunction = (data) => { +const taskFunction = data => { data = data || {} data.function = data.function || TaskFunctions.jsonIntegerSerialization const res = executeTaskFunction(data)