-
-
Save bnoordhuis/7a3f33b134544130cd3b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/benchmark/http_simple_auto.js b/benchmark/http_simple_auto.js | |
index f72cc01..c0dffea 100644 | |
--- a/benchmark/http_simple_auto.js | |
+++ b/benchmark/http_simple_auto.js | |
@@ -7,6 +7,7 @@ | |
// <target> Target to benchmark, e.g. `bytes/1024` or `buffer/8192`. | |
// | |
+var net = require("net"); | |
var path = require("path"); | |
var http = require("http"); | |
var spawn = require("child_process").spawn; | |
@@ -100,8 +101,12 @@ server.listen(port, function () { | |
process.argv[n] = url + process.argv[n]; | |
var cp = spawn('ab', process.argv.slice(2)); | |
- cp.stdout.pipe(process.stdout); | |
- cp.stderr.pipe(process.stderr); | |
+ var stdout = new net.Socket({fd: 1}); | |
+ var stderr = new net.Socket({fd: 2}); | |
+ stdout.unref(); | |
+ stderr.unref(); | |
+ cp.stdout.pipe(stdout); | |
+ cp.stderr.pipe(stderr); | |
cp.on('exit', function() { | |
server.close(); | |
process.nextTick(dump_mm_stats); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment