diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2017-03-29 23:31:31 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2017-04-09 18:16:08 +0800 |
commit | 3e3414f45fb872fd4378132f6aa893806b2fad98 (patch) | |
tree | 24c5f1b9504a5a2dbfd5fb002300b1211a86759d /benchmark/http/cluster.js | |
parent | a3e71a8901bc326bcc701820d10e10d9de4d338a (diff) | |
download | android-node-v8-3e3414f45fb872fd4378132f6aa893806b2fad98.tar.gz android-node-v8-3e3414f45fb872fd4378132f6aa893806b2fad98.tar.bz2 android-node-v8-3e3414f45fb872fd4378132f6aa893806b2fad98.zip |
benchmark: control HTTP benchmarks run time
PR-URL: https://github.com/nodejs/node/pull/12121
Refs: https://github.com/nodejs/node/issues/12068
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'benchmark/http/cluster.js')
-rw-r--r-- | benchmark/http/cluster.js | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/benchmark/http/cluster.js b/benchmark/http/cluster.js index 732a5fad66..464bcfdb63 100644 --- a/benchmark/http/cluster.js +++ b/benchmark/http/cluster.js @@ -7,11 +7,12 @@ if (cluster.isMaster) { var bench = common.createBenchmark(main, { // unicode confuses ab on os x. type: ['bytes', 'buffer'], - length: [4, 1024, 102400], + len: [4, 1024, 102400], c: [50, 500] }); } else { - require('./_http_simple.js'); + var port = parseInt(process.env.PORT || PORT); + require('../fixtures/simple-http-server.js').listen(port); } function main(conf) { @@ -26,7 +27,7 @@ function main(conf) { return; setTimeout(function() { - var path = '/' + conf.type + '/' + conf.length; + var path = '/' + conf.type + '/' + conf.len; bench.http({ path: path, |