Repository navigation
test: add spike, soak and breakpoint load tests - #170
Merged
Merged
Conversation
LoadPhases turns a list of named phases into Inject simulations and names each step after the phase that is running when it starts. LoadThreshold takes an optional abort count, so a runaway breakpoint run can stop early through AbortOnErrors. LoadTestBudgets gets Spike, Soak and Breakpoint groups. The spike budgets come from the worst of three runs with the usual headroom. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A heavy list query runs at 25 requests per second, jumps to 150 for 10 seconds, drains, and returns to 25. The test checks the error budget, tail latency and payload size per phase. It also requires the p95 after the spike to stay within twice the p95 before it, with a 100 ms floor. A cheap list query showed a p95 of 22 ms even at 200 requests per second, so it could not stress the API. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The mixed browsing load runs for about 12 minutes as a warm up and six named two minute segments. Every step is checked against its Medium baseline per segment, and the last segment must not drift past twice the first. Managed memory is sampled after forced collections at the end of the first segment and at the end of the run. The test carries Category=Soak only, so the normal load run skips it. The 150 MB growth limit has not been calibrated against a measured run. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A heavy query steps through 25, 50, 75, 100, 125 and 150 requests per second after a warm up phase. The breakpoint is the highest rate whose p95 stays under 800 ms with no failures, and the test asserts it is at least 50 requests per second. It measured 125 in two runs. A safety abort on a very high error rate stops a runaway run without failing the test. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
ADR 0009 records how the breakpoint is found and how the soak is run, with the measured breakpoint and spike figures. ADR 0008 gets the headroom rules the budgets use and a link to the new ADR. CLAUDE.md gets the command for the soak and breakpoint tests. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Dejmenek
added this pull request to stack #168
September 29, 2026 19:39
Dejmenek
marked this pull request as ready for review
September 29, 2026 19:44
Base automatically changed from
feat/165-loadtests-write-contention
to
main
September 29, 2026 19:51
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is the last PR for #165 and it is stacked on #169. It adds the three long running scenario types from the issue: a spike, a soak and a breakpoint test. It also records the design in a new ADR.
Tests
The spike test carries
Category=Load. Soak and breakpoint carryCategory=Soakonly, so the normal load run skips them.dotnet test TournamentAPI.LoadTests --filter "Category=Soak"runs them, andCLAUDE.mddocuments it.Helpers and docs
LoadPhasesturns named phases intoInjectsimulations and names each step after the phase running when it starts.LoadThresholdtakes an optional abort count for the breakpoint safety abort. ADR 0009 records why the breakpoint is read from per step latency after the run instead of from an abort on errors, and why the soak is one run with named segments. ADR 0008 now lists the headroom rules the budgets use.Things worth knowing
azure-sql-edgeimage from the issue's task list is not part of this stack. The image is still onlateston purpose.Testing
Unit tests (160) and integration tests (252) pass locally. The spike test passed three times and the breakpoint test twice on the final code. This PR only changes the load test project and the docs, and CI runs the unit and integration tests. Load tests need Docker and run manually.
Closes #165.
Stack created with GitHub Stacks CLI • Give Feedback 💬
🤖 Generated with Claude Code