import { Worker as ClusterWorker } from 'node:cluster'
import { Worker as ThreadWorker } from 'node:worker_threads'
import { cpus } from 'node:os'
import { Worker as ClusterWorker } from 'node:cluster'
import { Worker as ThreadWorker } from 'node:worker_threads'
import { cpus } from 'node:os'
const weights: Record<number, number> = {}
for (let workerNodeKey = 0; workerNodeKey < poolMaxSize; workerNodeKey++) {
weights[workerNodeKey] = defaultWorkerWeight
const weights: Record<number, number> = {}
for (let workerNodeKey = 0; workerNodeKey < poolMaxSize; workerNodeKey++) {
weights[workerNodeKey] = defaultWorkerWeight
// CPU estimated cycle time
const numberOfDigits = cpu.speed.toString().length - 1
const cpuCycleTime = 1 / (cpu.speed / Math.pow(10, numberOfDigits))
// CPU estimated cycle time
const numberOfDigits = cpu.speed.toString().length - 1
const cpuCycleTime = 1 / (cpu.speed / Math.pow(10, numberOfDigits))