Skip to content

Commit bb2885c

Browse files
committed
Don’t report timeout errors
In practice, we have always just added the timeouts to the XFails and keeping track of these timeouts is the major cause of stress tester failures, producing noise. We use instruction count measurements to keep track of performance.
1 parent f43df24 commit bb2885c

File tree

2 files changed

+8
-16
lines changed

2 files changed

+8
-16
lines changed

SourceKitStressTester/Sources/StressTester/SourceKitDocument.swift

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -533,21 +533,7 @@ class SourceKitDocument {
533533
try throwIfInvalid(response, request: info)
534534
try validateResponse(response)
535535

536-
// Hack to make ACHNBrowserUI/extensions/Path.swift insideOut-893:884 a
537-
// soft timeout. It seems to vary *wildly* between runs. We should
538-
// investigate why that is, but just get the stress tester to stop
539-
// failing for now.
540-
var forceSoftTimeout = false
541-
if case let .codeCompleteOpen(document, offset, _) = info,
542-
offset == 884,
543-
let modification = document.modification,
544-
modification.mode == .insideOut,
545-
modification.content.count == 893,
546-
document.path.hasSuffix("ACHNBrowserUI/extensions/Path.swift") {
547-
forceSoftTimeout = true
548-
}
549-
550-
if forceSoftTimeout || requestDuration > TimeInterval(SOURCEKIT_REQUEST_TIMEOUT) / 10 {
536+
if requestDuration > TimeInterval(SOURCEKIT_REQUEST_TIMEOUT) / 10 {
551537
// There was no error in the response, but the request took too long
552538
// throw a soft timeout.
553539
throw SourceKitError.softTimeout(request: info, duration: requestDuration, instructions: nil)

SourceKitStressTester/Sources/StressTester/StressTester.swift

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,13 @@ public class StressTester {
129129
if case SourceKitError.softTimeout(request: let request, duration: _, instructions: let .some(instructions)) = error {
130130
reportPerformanceMeasurement(request: request, instructions: instructions, reusingASTContext: nil)
131131
}
132-
errors.append(error)
132+
if case SourceKitError.timedOut = error {
133+
// Ignore timeout errors. In practice, we have always just added the timeouts to the XFails and keeping track
134+
// of these timeouts is the major cause of stress tester failures, producing noise.
135+
// We use instruction count measurements to keep track of performance.
136+
} else {
137+
errors.append(error)
138+
}
133139
}
134140
}
135141

0 commit comments

Comments
 (0)