journeys tui-kit: tk-storm, the L1 CLI storm in compiled Rust (held schedule, rate verdict)
Merged
LA
5d ago+850+850+012345678901234567890123456789-23-23-01234567890123456789
Summary
This is item 2 of the compiled-load plan (STATUS 4801; cmux-ad 03:40Z). The TYPING UNDER LOAD L1 CLI storm is now tk-storm, in Rust. This PR is stacked on #31748 (tk-gradient); its own change is the top 2 commits, 1c3338ede43e and e7cd7c40e504 (review fixes).
tk-storm: N worker threads share one schedule: call n is due at start + n / rate.- They run load_profiles.py's L1 mix with the same weights and argv shapes: list, tab create and close (each worker closes only its own tabs), terminal write, screen read,
notify --desktop false, workspace status, progress and log, andsnapshot.geton the app socket. - Each call is one
calls.jsonlline. - Each CLI call is killed after 30 s.
- The rate window ends at the stop, and only calls that started inside it count.
- The summary has
achieved_per_s,ok_per_s,asked_per_s,verdictandleftover_tabs, which the Python teardown closes. The verdict isNOT RUNwhen the calls that worked are below 95 % of the asked rate.
- They run load_profiles.py's L1 mix with the same weights and argv shapes: list, tab create and close (each worker closes only its own tabs), terminal write, screen read,
- load_profiles L1:
--engine auto(the default) runstk-stormwhen it is built. Python then does only the set-up, the wait and the teardown. The Python storm, and every profile with an asked rate, now also gives averdict.LOAD-DONEprints the verdict and the engine. - Items from the #31748 review:
- tk-gradient waits on a full non-blocking stdout (poll), so it no longer stops half way.
- Its events carry
darwin_bg. - build-bins passes
--target-dir, and fails when a program is missing after the build. - heavy
--build-binsalways builds (incrementally). - The Python
bytesfield counts UTF-8 bytes. --durationand--framesrefuse negative values, and--sizerefuses 0.- The pace_probe docstring is first in its function again.
Testing
Observed / Not run
Observed (cmux-orchestrator-1):
test_load_profiles.py: 15 tests OK. The newtest_rust_storm_holds_the_rateis skipped here (no Rust build on this VM). The newtest_python_engine_verdictpasses.test_tuikit.py: 36 tests OK, 2 skipped.rustfmt --check: clean.prepush-gate.py: no new violations.
Not run:
- The crate is not compiled. The fleet self-test compiles it after this lands, and runs the Rust tests with
CMUX_TUIKIT_REQUIRE_RUST=1. One of them checks that tk-storm holds 60 calls/s with no failed call against the stand-in CLI, whose grammar check refuses any wrong argv. The same test checks that the log has every counted call, that no second holds more than 1.3x the rate, and that at least 12 of the 13 kinds ran. - Against a real tagged build: the CLI call latency sets the reachable rate (about 8 workers ÷ the call latency). Above that, the run says
NOT RUN.
Changelog
none