Skip to content

Commit c3481e9

Browse files
committed
using all cpus available
1 parent be62a57 commit c3481e9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmark/gateway-cluster.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
'use strict'
22

33
const cluster = require('cluster')
4+
const os = require('os')
45

56
if (cluster.isMaster) {
6-
const cpuCount = 4
7+
const cpuCount = os.cpus().length
78
for (let i = 0; i < cpuCount; i++) {
89
cluster.fork()
910
}

0 commit comments

Comments
 (0)