summaryrefslogtreecommitdiff
path: root/benchmark/http/end-vs-write-end.js
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2017-03-29 23:31:31 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2017-04-09 18:16:08 +0800
commit3e3414f45fb872fd4378132f6aa893806b2fad98 (patch)
tree24c5f1b9504a5a2dbfd5fb002300b1211a86759d /benchmark/http/end-vs-write-end.js
parenta3e71a8901bc326bcc701820d10e10d9de4d338a (diff)
downloadandroid-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/end-vs-write-end.js')
-rw-r--r--benchmark/http/end-vs-write-end.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/benchmark/http/end-vs-write-end.js b/benchmark/http/end-vs-write-end.js
index 3c216e766c..163ad595a9 100644
--- a/benchmark/http/end-vs-write-end.js
+++ b/benchmark/http/end-vs-write-end.js
@@ -12,7 +12,7 @@ var common = require('../common.js');
var bench = common.createBenchmark(main, {
type: ['asc', 'utf', 'buf'],
- kb: [64, 128, 256, 1024],
+ len: [64 * 1024, 128 * 1024, 256 * 1024, 1024 * 1024],
c: [100],
method: ['write', 'end']
});
@@ -20,7 +20,7 @@ var bench = common.createBenchmark(main, {
function main(conf) {
const http = require('http');
var chunk;
- var len = conf.kb * 1024;
+ var len = conf.len;
switch (conf.type) {
case 'buf':
chunk = Buffer.alloc(len, 'x');