diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2013-11-01 15:44:43 +0100 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2013-11-01 15:44:44 +0100 |
commit | df3537102b9ba335f05315e513e7cb0123321362 (patch) | |
tree | c6f6e95f27af6049cdbd23a168693e35dca1fa64 /benchmark/http | |
parent | fe4fbc2a1e664516f54ca483d2726402c8518be4 (diff) | |
download | android-node-v8-df3537102b9ba335f05315e513e7cb0123321362.tar.gz android-node-v8-df3537102b9ba335f05315e513e7cb0123321362.tar.bz2 android-node-v8-df3537102b9ba335f05315e513e7cb0123321362.zip |
benchmark: add http chunked encoding benchmarks
Test both "Content-Length: xxx" and "Transfer-Encoding: chunked" responses in
the http/simple benchmark.
Diffstat (limited to 'benchmark/http')
-rw-r--r-- | benchmark/http/simple.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/benchmark/http/simple.js b/benchmark/http/simple.js index 8a1be98052..13af9669f4 100644 --- a/benchmark/http/simple.js +++ b/benchmark/http/simple.js @@ -5,6 +5,7 @@ var bench = common.createBenchmark(main, { // unicode confuses ab on os x. type: ['bytes', 'buffer'], length: [4, 1024, 102400], + chunks: [0, 1, 4], // chunks=0 means 'no chunked encoding'. c: [50, 500] }); @@ -13,7 +14,7 @@ function main(conf) { var spawn = require('child_process').spawn; var server = require('../http_simple.js'); setTimeout(function() { - var path = '/' + conf.type + '/' + conf.length; //+ '/' + conf.chunks; + var path = '/' + conf.type + '/' + conf.length + '/' + conf.chunks; var args = ['-r', 5000, '-t', 8, '-c', conf.c]; bench.http(path, args, function() { |