node/test/benchmark/test-benchmark-http.js
Rich Trott beb0800ab3
test: move benchmark tests out of main test suite
Move benchmark tests (which are slow) out of the main test suite. We can
hopefully add them to node-daily-master so that they are still run daily
on CI.

PR-URL: https://github.com/nodejs/node/pull/24265
Reviewed-By: Richard Lau <riclau@uk.ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2018-11-14 00:55:45 +01:00

34 lines
963 B
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',
'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'
],
{
NODEJS_BENCHMARK_ZERO_ALLOWED: 1,
duration: 0
});