Skip to content

feat(loadtest): Phase 2E — 5K-job / 4-worker end-to-end test - #5

Merged
smallchungus merged 1 commit into
mainfrom
phase-2e-loadtest
Apr 18, 2026
Merged

feat(loadtest): Phase 2E — 5K-job / 4-worker end-to-end test#5
smallchungus merged 1 commit into
mainfrom
phase-2e-loadtest

Conversation

@smallchungus

Copy link
Copy Markdown
Owner

Summary

Phase 2E: closes Phase 2 by proving the resume claim live.

  • New internal/loadtest package, //go:build loadtest. Runs 5000 NoopHandler jobs through 4 workers (in-process goroutines), asserts wall clock < 15 s.
  • testutil build tag widened to integration || loadtest so the load test can use the same Postgres/Redis container helpers.
  • New make loadtest target.
  • README section on reproducing the numbers.

Latest local run: 5000 jobs / 4 workers in 2.04 s (2,454 jobs/s). Resume claim was "10s" — we're 5x faster.

What this exercises (per job × 5000): EnqueueJob + Push + BRPOP + ClaimJob + heartbeat goroutine + MarkDone. Plus polling loop. Real Postgres + Redis via testcontainers.

Phase 2 milestone complete: queue handles enqueue → claim → process → heartbeat → mark done, with sweeper-driven recovery for crashed workers and exponential-backoff retries for failed handlers.

Test plan

  • make lint
  • make test-unit
  • make test-integration
  • make k8s-validate
  • make loadtest (2.04s, 2454 jobs/s)
  • CI green

@smallchungus
smallchungus merged commit f9e51c0 into main Apr 18, 2026
3 checks passed
@smallchungus
smallchungus deleted the phase-2e-loadtest branch April 18, 2026 01:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant