Repository navigation
test: the load suite, thrust-load-tests, with the latency and scale probes as nextest tests (test-suites PR 3) - #262
Merged
Merged
Conversation
…probes as nextest tests PR 3 of the test-suites plan. crates/testing/suites/load is a new crate: - tests/latency.rs: load_latency_one_request_at_a_time and load_latency_eight_requests_at_once (the `bench` binary run at concurrency 1 and 8); THRUST_LOAD_ITERATIONS sets the creates (200). - tests/scale.rs: load_scale_list_search_and_create (`bench_scale`), reading THRUST_SCALE_TOTAL and THRUST_SCALE_PER_PROJECT itself. - src/lib.rs: what they compute, now tested: the nearest-rank percentile and a sample's summary, how many keys a run needs and which is next, `timed`, and the items the scale test seeds. tests/measure.rs holds those to their definitions over generated inputs (prop_), and runs in the default loop. cargo-mutants on the crate: 33 caught, 0 missed, 2 unviable, 3 timeouts (loops made endless). Its first run missed 6, and the fix was tests, not skips: `report` takes the writer it writes to, so its output is checked; `env_usize` and the index `timed` gives each call are checked too. - The load tests use the contract suite's client (Target, User, Fixture) as a dev-dependency, the one kind ADR-0009 rule 6 and check-layout.sh allow on a crate in testing/. thrust-contract-tests joins [workspace.dependencies] for it. The `bench` and `bench_scale` binaries leave thrust-contract-tests. scripts/contract.sh's `bench` and `scale` passes run `load_pass`, which is `cargo nextest run --cargo-profile release -p thrust-load-tests --profile load -E 'test(/^<prefix>/)'`. As before, success is every request succeeding; nextest's 4 (no test ran) becomes 5. .config/nextest.toml: a `load` profile (one test at a time, output shown on a pass, no kill), and the default loop leaves out only the load_ tests of the crate, not its own hermetic tests. Co-Authored-By: Claude Opus 5.5 <[email protected]>
AGENTS.md rule 4 gains the `load_` prefix. crates/testing/README.md and testing/suites/README.md name `load/` (stress, spike and soak join it when each has a workload). docs/src/testing/techniques/performance.md names the load tests behind the `bench` and `scale` passes. docs/src/contributing/ crates.md: twenty crates, fifteen in [workspace.dependencies] now that thrust-contract-tests is a dev-dependency of thrust-load-tests. ARCHITECTURE §2a gains `suites/load/`. The plan: PR 2 merged, PR 3's status and what was built differently (the default loop leaves out only the load_ tests). Co-Authored-By: Claude Opus 5.5 <[email protected]>
… tag
check-release-plz.py (the deps job) refused the new crate: a workspace
member with no [[package]] entry, missing from thrust-core's
changelog_include, and not in v0.2.0, the last release, where release-plz
would look for it and stop ("cannot find package"). It joins the version
group and the changelog, and gets the first-release pattern
git_tag_name = "thrust-load-tests-v{{ version }}", as thrust-edge did,
until a release contains it.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Merged
This was referenced Nov 17, 2026
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.
PR 3 of the test-suites plan (
.agents/plans/test-suites/): the load suite.crates/testing/suites/loadis a new crate,thrust-load-tests. The latency and scale probes leavethrust-contract-tests, where they were binaries, and become nextest tests namedload_, as the owner decided.What
tests/latency.rs:load_latency_one_request_at_a_timeandload_latency_eight_requests_at_once. These are thebenchbinary, whichcontract.shran twice, at concurrency 1 and 8.THRUST_LOAD_ITERATIONSsets the number of creates (200 by default).tests/scale.rs:load_scale_list_search_and_create, thebench_scalebinary. It readsTHRUST_SCALE_TOTALandTHRUST_SCALE_PER_PROJECTitself, with the same defaults.src/lib.rs: what the probes compute, now tested:timed;tests/measure.rsholds each of these to its definition over generated inputs (prop_). Those tests are hermetic and run in the default loop.The load tests use the contract suite's client (
Target,User,Fixture) as a dev-dependency, the one kind ADR-0009 rule 6 andcheck-layout.shallow on a crate intesting/.thrust-contract-testsjoins[workspace.dependencies]for it.scripts/contract.sh: thebenchandscalepasses callload_pass <prefix>, which runscargo nextest run --cargo-profile release -p thrust-load-tests --profile load -E 'test(/^<prefix>/)'. As before, a pass succeeds when every request succeeded, and no number gates. nextest's 4 ("no test ran") becomes 5, as for every pass..config/nextest.toml: aloadprofile runs one test at a time, shows output on a pass, and kills nothing. The default loop leaves out only this crate'sload_tests, not its own hermetic tests. That differs from the plan, which left out the whole package, and the plan now says so.release-plz.toml: the new crate joins the version group and the changelog, with the first-release tag pattern thatthrust-edgegot (fix(release): give a crate added since the last release a first-release tag pattern, and check both ends #222).check-release-plz.pyrefused it without that.Docs: AGENTS.md rule 4 gains
load_. Also updated: thetesting/READMEs,performance.md,crates.md(twenty crates, fifteen workspace entries), ARCHITECTURE §2a and the plan.Stress, spike and soak tests are not created; each joins
load/when it has a workload (ADR-0009, no stubs).Evidence
Every check below has a control that makes it fail (AGENTS.md rule 8).
cargo nextest run -p thrust-load-tests(default profile)load_tests skippedcargo nextest list --profile loadload_testscargo mutants -p thrust-load-testsreportnow takes the writer it writes to, so its output is checked;env_usize, and the indextimedgives each call, are checked tooload_latency_one…withTHRUST_BASE_URL=http://127.0.0.1:9: exit 100, 1 failedcontract.sh'sload_passbenchandscaleexit 0 onnative-memorycargo nextest run --profile ci --workspacedepsandci-scriptsjobs, read fromci.yml, shell scripts under dash, after merging today'smaincheck-release-plz.pyrefused the crate until it was declared (above)scripts/check-layout.shtesting/suites/README.mdnamesload/cargo metadata --lockedafter mergingmain(a crate-adding PR)The numbers. The plan asks for the same order as the binaries, measured on the same machine in the same session. All runs are on
native-memory,scaleat 10,000 items in projects of 1,000, with a big project of 2,000. Times are p50 in ms.bench, c=1In round 1 the new test ran right after its 26 s release build. Round 2, in the other order, shows no gap.
scaleshowed a repeating gap on create at c=1: 0.14 against 0.39 ms in round 1, and 0.18 against 0.44 in round 2. To tell whether nextest or the code causes it, round 3 put three clients against one target, interleaved twice: the old binary, the new test through nextest, and the new test's binary run directly.scale, one targetThe client makes no difference beyond noise. What changes is the position in the sequence: each run seeds 12,000 more items into the same in-memory server, so each is slower than the one before. The earlier gaps came from separate targets on a busy machine.
Cargo.tomland.config/changed, so CI runs everything.🤖 Generated with Claude Code