summaryrefslogtreecommitdiff
path: root/benchmark/http
diff options
context:
space:
mode:
authorisaacs <i@izs.me>2013-02-25 08:30:05 -0800
committerisaacs <i@izs.me>2013-02-25 17:47:28 -0800
commit88befa6021d136257939a2caba14e69ad9c43dd5 (patch)
tree7a2b494ff0c909ebe1fd8700c161730709f97e06 /benchmark/http
parentf80f3c5f62a3955636c1af1872ef9539a0b01cb0 (diff)
downloadandroid-node-v8-88befa6021d136257939a2caba14e69ad9c43dd5.tar.gz
android-node-v8-88befa6021d136257939a2caba14e69ad9c43dd5.tar.bz2
android-node-v8-88befa6021d136257939a2caba14e69ad9c43dd5.zip
bench: Make http easier to profile
Do not run the http/simple.js server in a child process. Fix #4831
Diffstat (limited to 'benchmark/http')
-rw-r--r--benchmark/http/simple.js5
1 files changed, 2 insertions, 3 deletions
diff --git a/benchmark/http/simple.js b/benchmark/http/simple.js
index 04a2a2911f..8a1be98052 100644
--- a/benchmark/http/simple.js
+++ b/benchmark/http/simple.js
@@ -11,14 +11,13 @@ var bench = common.createBenchmark(main, {
function main(conf) {
process.env.PORT = PORT;
var spawn = require('child_process').spawn;
- var simple = require('path').resolve(__dirname, '../http_simple.js');
- var server = spawn(process.execPath, [simple]);
+ var server = require('../http_simple.js');
setTimeout(function() {
var path = '/' + conf.type + '/' + conf.length; //+ '/' + conf.chunks;
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
bench.http(path, args, function() {
- server.kill();
+ server.close();
});
}, 2000);
}