From 888c16a7d304c7bcfe9a7eebeb66fb04d849903e Mon Sep 17 00:00:00 2001 From: George Barnett Date: Thu, 20 Nov 2025 15:25:04 +0000 Subject: [PATCH] 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 --- Benchmarks/Benchmarks/NIOPosixBenchmarks/Benchmarks.swift | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Benchmarks/Benchmarks/NIOPosixBenchmarks/Benchmarks.swift b/Benchmarks/Benchmarks/NIOPosixBenchmarks/Benchmarks.swift index ccc8365c5..ed178968c 100644 --- a/Benchmarks/Benchmarks/NIOPosixBenchmarks/Benchmarks.swift +++ b/Benchmarks/Benchmarks/NIOPosixBenchmarks/Benchmarks.swift @@ -31,7 +31,8 @@ let benchmarks = { metrics: defaultMetrics, scalingFactor: .mega, maxDuration: .seconds(10_000_000), - maxIterations: 5 + maxIterations: 5, + thresholds: [.mallocCountTotal: .init(absolute: [.p90: 50])] ) ) { benchmark in try runTCPEcho(