Skip to content

Commit d1bb9d0

Browse files
authored
fix: lower NFR throughput CI thresholds from 500 to 300 ops/sec (#1550)
GitHub Actions runners consistently achieve 390-470 ops/sec on these benchmarks, causing flaky failures at the 500 threshold. Lower to 300 to provide headroom while still catching real performance regressions. Production targets remain unchanged (10000 and 1000 ops/sec). Co-authored-by: Ben Coombs <bjcoombs@users.noreply.github.com>
1 parent 5bda114 commit d1bb9d0

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

services/internal-account/benchmarks/load_test.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,9 +275,10 @@ func TestThroughputUnderLoad(t *testing.T) {
275275
}
276276

277277
// Advisory target: >1000 ops/sec
278-
// CI environments may be slower due to shared resources
279-
if opsPerSecond < 500 {
280-
t.Errorf("Throughput below CI threshold: %.0f (CI threshold: >500, production target: >1000)", opsPerSecond)
278+
// CI environments may be slower due to shared resources.
279+
// CI runners consistently achieve 390-470 ops/sec; 300 provides headroom.
280+
if opsPerSecond < 300 {
281+
t.Errorf("Throughput below CI threshold: %.0f (CI threshold: >300, production target: >1000)", opsPerSecond)
281282
} else if opsPerSecond < 1000 {
282283
t.Logf("Note: Throughput %.0f below production target (>1000) but passes CI threshold", opsPerSecond)
283284
}

services/internal-account/benchmarks/nfr_validation_test.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -430,8 +430,9 @@ func TestNFR_SustainedThroughput(t *testing.T) {
430430

431431
// Advisory throughput target - testcontainer environments have significant overhead.
432432
// Production with connection pooling achieves much higher throughput.
433+
// CI runners consistently achieve 390-470 ops/sec; 300 provides headroom.
433434
targetThroughput := 10000.0
434-
ciThreshold := 500.0 // Relaxed for CI testcontainer overhead
435+
ciThreshold := 300.0 // Relaxed for CI testcontainer + shared runner overhead
435436

436437
if opsPerSecond < ciThreshold {
437438
t.Errorf("Throughput below CI threshold: %.0f (CI threshold: >%.0f, production target: >%.0f)", opsPerSecond, ciThreshold, targetThroughput)

0 commit comments

Comments
 (0)