Skip to content

Commit df35371

Browse files
committed
benchmark: add http chunked encoding benchmarks
Test both "Content-Length: xxx" and "Transfer-Encoding: chunked" responses in the http/simple benchmark.
1 parent fe4fbc2 commit df35371

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

benchmark/http/simple.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ var bench = common.createBenchmark(main, {
55
// unicode confuses ab on os x.
66
type: ['bytes', 'buffer'],
77
length: [4, 1024, 102400],
8+
chunks: [0, 1, 4], // chunks=0 means 'no chunked encoding'.
89
c: [50, 500]
910
});
1011

@@ -13,7 +14,7 @@ function main(conf) {
1314
var spawn = require('child_process').spawn;
1415
var server = require('../http_simple.js');
1516
setTimeout(function() {
16-
var path = '/' + conf.type + '/' + conf.length; //+ '/' + conf.chunks;
17+
var path = '/' + conf.type + '/' + conf.length + '/' + conf.chunks;
1718
var args = ['-r', 5000, '-t', 8, '-c', conf.c];
1819

1920
bench.http(path, args, function() {

0 commit comments

Comments
 (0)