0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/benchmark/test-benchmark-http.js
Refael Ackermann fe58bef7e2 test: add arg to narrow http benchmark test
PR-URL: https://github.com/nodejs/node/pull/26101
Reviewed-By: Weijia Wang <starkwang@126.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2019-02-14 19:09:36 -05:00

39 lines
1.1 KiB
JavaScript

'use strict';
const common = require('../common');
if (!common.enoughTestMem)
common.skip('Insufficient memory for HTTP 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('http',
[
'benchmarker=test-double-http',
'c=1',
'e=0',
'url=long',
'arg=string',
'chunkedEnc=true',
'chunks=0',
'dur=0.1',
'duplicates=1',
'input=keep-alive',
'key=""',
'len=1',
'method=write',
'n=1',
'res=normal',
'type=asc',
'value=X-Powered-By',
'headerDuplicates=1',
],
{
NODEJS_BENCHMARK_ZERO_ALLOWED: 1,
duration: 0
});