Permalink
Browse files

bench: add http_simple cluster edition benchmark

  • Loading branch information...
1 parent 1e3e6b7 commit 89014c9d4055803a4413de08e41983434eadfd3d @bnoordhuis bnoordhuis committed Nov 4, 2011
Showing with 8 additions and 0 deletions.
  1. +8 −0 benchmark/http_simple_cluster.js
View
8 benchmark/http_simple_cluster.js
@@ -0,0 +1,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();
+} else {
+ require(__dirname + '/http_simple.js');
+}

0 comments on commit 89014c9

Please sign in to comment.