Repository navigation
id: implement the loadgen core and re-express world_bench on it (#8307) - #10067
Conversation
Step 1 of the #5891 shared workload-generator record: a std-only core in tests/common/loadgen.rs (mix tables as counts per 1,000 ops, a seeded corpus and actor derivation, honest/adversarial profiles, the Target surface trait, and a closed-loop scheduler whose runs are replayable from their spec), wired into tests/common and covered by the seeded-determinism acceptance tests. The four synchronous world_bench workloads run through the scheduler as InProcess surfaces with unchanged output lines; the two async wall-clock-paced workloads keep their dedicated drivers until the record's open-loop executor step.
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 50 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
* id: implement the per-interface benchmark matrix (#5896) Implements the #5896 decision record (task 10503) on top of the landed prerequisites: the #5891 loadgen core (#8307, PR #10067) and the #5894 standard server baseline (fleet-laptop / ci-runner machine classes, standard-default configuration, scales S0/S1/S2). - world_bench: the four loadgen-core workloads now also emit a versioned results.jsonl bundle — a run manifest (schema_version, run_id, git sha, started_at_utc, machine_class, OS/arch, CPU, toolchain, build profile, generator version, seed) plus one cell record per (workload x interface x configuration) tuple. The measured interface is in_process; the shell-contract transports (iroh, websocket, ssh-exec) have no adapter in this harness, so their cells are recorded explicitly as unsupported with a reason — never omitted, never zero. Measured cells carry metric entries with statistic, unit, value, sample_count and raw samples. The legacy bench lines / baseline.txt remain the compatibility view. - id-bench-compare.sh: matrix mode for .jsonl inputs compares by the full identity (machine_class, workload_id, interface_id, configuration_id, metric, statistic) — same-name cells on different interfaces can no longer collide; a machine-class mismatch is incomparable, never compared; explicit non-measured statuses are reported as-is. Legacy mode unchanged; tests cover both (all pass). - id-bench.yml: stamps the bundle ci-runner + the run commit, uploads results.jsonl with the raw output in the bench-output artifact, and links the bundle from the job summary (index, not the record). - BASELINES.md: documents the bundle, the identity, the machine classes, and the re-baseline procedure for baseline.jsonl. Verified: cargo bench build (bench profile) succeeds; a --quick run of journal_append_fsync emits a well-formed bundle (manifest + measured cell + 3 unsupported transport cells) and its median (5144us) is in line with the committed baseline (5180us). Task 12924 (queue repo-health-code-pilot), lane code-a. * id: add the fleet-laptop matrix baseline (#5896) baseline.jsonl generated by a full-size world_bench run on the fleet reference laptop at 9bcd1a7 (manifest inside the bundle carries run_id, commit, machine class fleet-laptop, rustc 1.99.0): 4 measured in_process cells + 12 explicitly unsupported transport cells. Self-comparison with id-bench-compare.sh matrix mode reports every measured metric ok at +0.0%. Note: the matrix guest_replay median (1.284 us_per_event) differs from the legacy baseline.txt line (0.170) — the #8307 loadgen re-expression changed that workload's shape after baseline.txt was taken (2026-10-30); the matrix baseline records the current harness's numbers, and baseline.txt is untouched by this change. --------- Co-authored-by: repo-worker-tmp-code-b <fleet@developing.today>
Implements step 1 of the #5891 shared workload-generator record (packet #8307): the loadgen core in
pkgs/id/tests/common/loadgen.rs, plus theworld_benchre-expression, without changing any bench output line.The core (
tests/common/loadgen.rs, std-only)MixTablestates counts per 1,000 ops over the op families (validated: sums to exactly 1,000, no family twice); the op stream is a pure function of the mix — op i is decided by i mod 1,000 walking the table — so mixes are never time-sampled.mod common;, benches via#[path]).Targetis the record §2 contract (connect(seed, actor), per-opexecute,disconnect). A surface refusing an op class aborts the run — unsupported is recorded, never silently downgraded.RunSpec::header_line()fixes the §4 run-identity fields; the header/summary writer is step 2 and is deliberately not here.GENERATOR_VERSIONstarts at 1.The bench re-expression (
benches/world_bench.rs)The four synchronous workloads now run as loadgen workloads (single-family mixes,
Profile::honest, fixed seed) through the scheduler against InProcess surfaces implemented as direct core calls, with their sample math and output lines unchanged:journal_append_fsync— one actor; connect opens the per-rep journal; the append op times eachFileJournal::append; sample = mean op latency.checkpoint_compaction— the journal fill moves to connect (untimed setup, as before); the single measured op is the compaction.guest_replay— journal construction moves to connect; the measured op is restore + replay, still asserting the guest saw every committed event (id(bench): PR #1387 guest_replay benchmark replays zero events — restore() never puts committed chat events in replay #1403's lesson kept).session_fanout— connect spawns the world and subscribes all clients (inside the runtime, asWorldHandle::spawnrequires); the measured op is one chat round drained by every receiver; sample = mean round latency per client.The two async, wall-clock-paced workloads (
many_worlds,fuel_spin_isolation) keep their dedicated drivers in this step: their pacing is the open-loop / rate-based executor work of the record's later steps, and faking a closed-loop re-expression would change what they measure. That boundary is named in the bench source and on #8307.Verification
cargo test --test loadgen_determinism: 16/16 pass — the module's unit tests (mix validation and stream counts, corpus/actor determinism, warm-up discarding, unsupported-abort, open-loop refusal, header fields) plus the acceptance invariant through the public include path: same seed → identical corpus sequence and identical driven workload sequence.cargo bench --bench world_bench -- --quick: all six output lines in their established formats (values are the laptop's, not baseline updates — baselines move only under the id: design: the standard server baseline (from #5685) #5894 protocol).Closes #8307. Unblocks the #5896 benchmark-matrix task (queue 12924) on the core; steps 2+ of the record remain their own packets.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.