File tree Expand file tree Collapse file tree 2 files changed +3
-4
lines changed
Expand file tree Collapse file tree 2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -275,8 +275,7 @@ extension [Alerting.BuildInfo] {
275275
276276 func validateSuccessRateInRange( ) -> Alerting . Validation {
277277 let successRate = Double ( filter { $0. status == . ok } . count) / Double( count)
278- // Success rate has been around 30% generally
279- if 0.15 <= successRate && successRate <= 0.45 {
278+ if 0.15 <= successRate && successRate <= 0.85 {
280279 return . ok
281280 } else {
282281 let percentSuccessRate = ( successRate * 1000 ) . rounded ( ) / 10
Original file line number Diff line number Diff line change @@ -117,12 +117,12 @@ extension AllTests.AlertingTests {
117117 #expect( all. validateSuccessRateInRange ( ) == . failed( reasons: [ " Global success rate of 14.9% out of bounds " ] ) )
118118 }
119119 do {
120- let okCount = 451
120+ let okCount = 851
121121 let failedCount = 1000 - okCount
122122 let okBuilds = ( 0 ..< okCount) . map { _ in Alerting . BuildInfo. mock ( status: . ok) }
123123 let failedBuilds = ( 0 ..< failedCount) . map { _ in Alerting . BuildInfo. mock ( status: . failed) }
124124 let all = okBuilds + failedBuilds
125- #expect( all. validateSuccessRateInRange ( ) == . failed( reasons: [ " Global success rate of 45 .1% out of bounds " ] ) )
125+ #expect( all. validateSuccessRateInRange ( ) == . failed( reasons: [ " Global success rate of 85 .1% out of bounds " ] ) )
126126 }
127127 }
128128
You can’t perform that action at this time.
0 commit comments