Repository navigation
feat(journeys): ramp journeys together to catch interference, and --expect - #9
Merged
Merged
Conversation
…est think time and compare
# Conflicts: # CHANGELOG.md # README.md # cli/src/prescale_cli/commands/run.py # cli/src/prescale_cli/journeys/load.py # cli/src/prescale_cli/journeys/replay.py # cli/src/prescale_cli/loadtest.py # cli/src/prescale_cli/render.py # cli/src/prescale_cli/schema/result.schema.json # cli/tests/test_journeys_load.py
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.
Stacked on #8 (itself on #7). The base is #8's branch, so the diff shows only this slice. It gets retargeted to
mainonce #7 and #8 merge.After ramping each journey alone,
prescale runramps them all together, with the users split between journeys byweight. Each user stays on its journey for the stage, so a weight is that journey's share of the users in the app at once, and the number on each journey at every level is exact. If the journey that breaks first does so with no more of its own users than it surely held alone (the low end of its band), the report flags interference: it competes with the other journeys for something they share, such as a database pool, CPU or a cache. No journey shows that on its own.--no-combinedskips this pass.--expect Nsays whether you'd hold N users at peak. A URL run compares its verdict. In a journey run, N is split across journeys by weight: each journey must hold its share alone, and all journeys together must hold N. A journey that wasn't load-tested still takes its share and makes the answer unknown (❔). It reports only; it doesn't change the exit code (--fail-underdoes).Saved runs gain
combined(mix, survives, band, culprit journey and step, interference) andexpect. Both are additive underschema_version: 1.How it was verified
The example shop, with checkout plus a one-step "quickbuy" journey (
GET /checkout). Both draw from the shop's 25-connection pool.--expect 300: together they held through 400 users; no interference. The answer is still 🛑, because checkout's share (~23) is above the ~20 it holds alone.--expectin URL and journey mode, with untested journeys;--no-combined.ruff check cli/src: clean ·pytest cli/tests -q: 304 passed.Risk
Tier: risky · Public surface: Result
combinedandexpect, plus the JSON Schema; flags--no-combinedand--expect; combined-pass steps labelledjourney › step. Rollback: revert; the fields are additive and runs stay local.Fresh-context review blocked a real flaw in the first version. Weight decided which journey each walk started, not how many users were in each journey at once. A slow journey (checkout's 1s think) held far more concurrent users than its weight said. So the mix, the "users at break" figure behind interference, and the
--expectsplit were estimates, and wrong. The first version's interference result on the shop was that artifact. The fix pins each user to one journey, apportioned by weight, and the evidence above was re-measured after it. Also from the review:--expectunknown instead of being silently dropped--expectdoesn't change the exit codeNotes for review
The HTML report doesn't show journeys, the combined pass or
--expectyet. That's slice 4 ("journeys everywhere":show, HTML,compare, the PR comment and MCP).Generated by Claude Code