From bc88adeba06110cbc32f22e949eadd17614d8b45 Mon Sep 17 00:00:00 2001 From: Marc Prud'hommeaux Date: Sun, 5 Jan 2025 15:14:32 -0500 Subject: [PATCH] Check for environment XCTEST_MEASURE_MAX_STDDEV for maxRelativeStandardDeviation --- Sources/XCTest/Private/WallClockTimeMetric.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/XCTest/Private/WallClockTimeMetric.swift b/Sources/XCTest/Private/WallClockTimeMetric.swift index 2fe945a346..64361647b1 100644 --- a/Sources/XCTest/Private/WallClockTimeMetric.swift +++ b/Sources/XCTest/Private/WallClockTimeMetric.swift @@ -30,7 +30,7 @@ internal final class WallClockTimeMetric: PerformanceMetric { measurements.append(stopTime-startTime) } - private let maxRelativeStandardDeviation = 10.0 + private let maxRelativeStandardDeviation = ProcessInfo.processInfo.environment["XCTEST_MEASURE_MAX_STDDEV"].flatMap({ Double($0) }) ?? 10.0 private let standardDeviationNegligibilityThreshold = 0.1 func calculateResults() -> String {