0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-30 07:27:22 +01:00
nodejs/test/sequential/test-benchmark-http.js
Rich Trott 7e4893df60 test: reduce test-benchmark-http iterations
Supply `type=asc` option in test-benchmark-http to reduce runs in all
benchmark files to one combination of options.

PR-URL: https://github.com/nodejs/node/pull/16137
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2017-10-12 09:23:34 -07:00

29 lines
799 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',
'c=1',
'chunkedEnc=true',
'chunks=0',
'dur=0.1',
'key=""',
'len=1',
'method=write',
'n=1',
'res=normal',
'type=asc'
],
{ NODEJS_BENCHMARK_ZERO_ALLOWED: 1 });