diff options
author | Rich Trott <rtrott@gmail.com> | 2018-10-24 19:23:25 -0700 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2018-10-29 11:39:32 -0700 |
commit | 2812759f9352e2d180aeea8c1999dd2c6ab36371 (patch) | |
tree | b974f51a2652cc410c62d21f40c1737e87f47c83 /test/sequential | |
parent | 2f1c356d7abe4949b5ee68e0724ed7e493fc03e1 (diff) | |
download | android-node-v8-2812759f9352e2d180aeea8c1999dd2c6ab36371.tar.gz android-node-v8-2812759f9352e2d180aeea8c1999dd2c6ab36371.tar.bz2 android-node-v8-2812759f9352e2d180aeea8c1999dd2c6ab36371.zip |
test: add test-benchmark-http2
PR-URL: https://github.com/nodejs/node/pull/23863
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'test/sequential')
-rw-r--r-- | test/sequential/test-benchmark-http.js | 2 | ||||
-rw-r--r-- | test/sequential/test-benchmark-http2.js | 27 |
2 files changed, 28 insertions, 1 deletions
diff --git a/test/sequential/test-benchmark-http.js b/test/sequential/test-benchmark-http.js index 22efce5190..7255e655c0 100644 --- a/test/sequential/test-benchmark-http.js +++ b/test/sequential/test-benchmark-http.js @@ -13,7 +13,7 @@ const runBenchmark = require('../common/benchmark'); runBenchmark('http', [ - 'benchmarker=test-double', + 'benchmarker=test-double-http', 'c=1', 'chunkedEnc=true', 'chunks=0', diff --git a/test/sequential/test-benchmark-http2.js b/test/sequential/test-benchmark-http2.js new file mode 100644 index 0000000000..0abe490973 --- /dev/null +++ b/test/sequential/test-benchmark-http2.js @@ -0,0 +1,27 @@ +'use strict'; + +const common = require('../common'); + +if (!common.enoughTestMem) + common.skip('Insufficient memory for HTTP/2 benchmark test'); + +// Because the http benchmarks use hardcoded ports, this should be in sequential +// rather than parallel to make sure it does not conflict with tests that choose +// random available ports. + +const runBenchmark = require('../common/benchmark'); + +runBenchmark('http2', + [ + 'benchmarker=test-double-http2', + 'clients=1', + 'length=65536', + 'n=1', + 'nheaders=0', + 'requests=1', + 'streams=1' + ], + { + NODEJS_BENCHMARK_ZERO_ALLOWED: 1, + duration: 0 + }); |