Skip to content

Commit 888c16a

Browse files
authored
Add some slack to the TCPEcho benchmark (#3451)
Motivation: TCPEcho has some run-to-run variation which makes CI flaky. Modifications: - Add a little slack to TCPEcho; it has a low total alloc count so some slack is fine as it's less than a per iteration allocation Result: CI less flaky
1 parent 206dacf commit 888c16a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Benchmarks/Benchmarks/NIOPosixBenchmarks/Benchmarks.swift

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,8 @@ let benchmarks = {
3131
metrics: defaultMetrics,
3232
scalingFactor: .mega,
3333
maxDuration: .seconds(10_000_000),
34-
maxIterations: 5
34+
maxIterations: 5,
35+
thresholds: [.mallocCountTotal: .init(absolute: [.p90: 50])]
3536
)
3637
) { benchmark in
3738
try runTCPEcho(

0 commit comments

Comments
 (0)