Skip to content

Commit

Permalink
test: fix long-running http benchmarks
Browse files Browse the repository at this point in the history
PR-URL: #20125
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Rich Trott <[email protected]>
  • Loading branch information
apapirovski authored and jasnell committed Apr 23, 2018
1 parent c61db33 commit 6278c4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions benchmark/http/cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ function main({ type, len, c }) {
if (workers < 2)
return;

setTimeout(function() {
setImmediate(function() {
const path = `/${type}/${len}`;

bench.http({
Expand All @@ -36,6 +36,6 @@ function main({ type, len, c }) {
w1.destroy();
w2.destroy();
});
}, 100);
});
});
}
4 changes: 3 additions & 1 deletion test/sequential/test-benchmark-http.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ runBenchmark('http',
'chunkedEnc=true',
'chunks=0',
'dur=0.1',
'input=keep-alive',
'key=""',
'len=1',
'method=write',
'n=1',
'res=normal',
'type=asc'
'type=asc',
'value=X-Powered-By'
],
{
NODEJS_BENCHMARK_ZERO_ALLOWED: 1,
Expand Down

0 comments on commit 6278c4b

Please sign in to comment.