Skip to content

Commit 6278c4b

Browse files
apapirovskijasnell
authored andcommitted
test: fix long-running http benchmarks
PR-URL: #20125 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Rich Trott <rtrott@gmail.com>
1 parent c61db33 commit 6278c4b

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

benchmark/http/cluster.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ function main({ type, len, c }) {
2626
if (workers < 2)
2727
return;
2828

29-
setTimeout(function() {
29+
setImmediate(function() {
3030
const path = `/${type}/${len}`;
3131

3232
bench.http({
@@ -36,6 +36,6 @@ function main({ type, len, c }) {
3636
w1.destroy();
3737
w2.destroy();
3838
});
39-
}, 100);
39+
});
4040
});
4141
}

test/sequential/test-benchmark-http.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,14 @@ runBenchmark('http',
1818
'chunkedEnc=true',
1919
'chunks=0',
2020
'dur=0.1',
21+
'input=keep-alive',
2122
'key=""',
2223
'len=1',
2324
'method=write',
2425
'n=1',
2526
'res=normal',
26-
'type=asc'
27+
'type=asc',
28+
'value=X-Powered-By'
2729
],
2830
{
2931
NODEJS_BENCHMARK_ZERO_ALLOWED: 1,

0 commit comments

Comments
 (0)