Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Noordhuis <info@bnoordhuis.nl>2011-11-09 20:32:39 +0400
committerBen Noordhuis <info@bnoordhuis.nl>2011-11-09 20:34:53 +0400
commit4fc0fdc6ee8c41320f4d4ea74e4fa8a3ac12ed57 (patch)
tree9f0de52a3bde9b25729873f4a8fc590592cc9a2e /benchmark
parentcdcb1118c83c9f5804b6d22c8b13b2dd084c140b (diff)
bench: start (NUM_CPUS-1) workers
The master is a worker too so fork off one less worker.
Diffstat (limited to 'benchmark')
-rw-r--r--benchmark/http_simple_cluster.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/benchmark/http_simple_cluster.js b/benchmark/http_simple_cluster.js
index b49ea400b7f..ecc3169adb7 100644
--- a/benchmark/http_simple_cluster.js
+++ b/benchmark/http_simple_cluster.js
@@ -2,7 +2,8 @@ var cluster = require('cluster');
var os = require('os');
if (cluster.isMaster) {
- for (var i = 0, n = os.cpus().length; i < n; ++i) cluster.fork();
+ console.log('master running on pid %d', process.pid);
+ for (var i = 1, n = os.cpus().length; i < n; ++i) cluster.fork();
} else {
require(__dirname + '/http_simple.js');
}