From 2812759f9352e2d180aeea8c1999dd2c6ab36371 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Wed, 24 Oct 2018 19:23:25 -0700 Subject: test: add test-benchmark-http2 PR-URL: https://github.com/nodejs/node/pull/23863 Reviewed-By: Anatoli Papirovski Reviewed-By: James M Snell --- test/sequential/test-benchmark-http.js | 2 +- test/sequential/test-benchmark-http2.js | 27 +++++++++++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 test/sequential/test-benchmark-http2.js (limited to 'test/sequential') 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 + }); -- cgit v1.2.3