Skip to main content

Crate blockworx_bench

Crate blockworx_bench 

Source
Expand description

What a user waits for, on the settled 50×50 grid, as scenarios both the criterion benches (benches/kernel.rs) and the phase breakdown (examples/spans.rs) run — so the number and its breakdown are of the same thing.

  • cargo bench -p blockworx-bench times them; -- --save-baseline <name> and -- --baseline <name> compare runs.
  • cargo run --release -p blockworx-bench --example spans tallies where each one’s time goes, span by span. The tally is attribution, not timing: the subscriber costs time of its own.

Each scenario is one kernel call as the frame loop makes it, over a container in memory so a commit pays for the rev it writes. Where the call could quietly do nothing — a nudge refused, a drop that moves nothing — its preparation checks that it does not, since it would time nothing.

Structs§

Rig
One session under test, and what driving it needs.
Scenario
A call a user waits for, in three parts: what sets it up once, what comes before each one without being part of it, and the call itself.

Constants§

SCENARIOS
Every scenario, in the order they are reported.
SIDE
The grid’s side. 2,500 blocks and 7,550 wires: the scale the region router was built for.
TWO_CELLS 🔒
Two cells to the right: a move that stays clear of the neighbours.
ZOOMED 🔒
The widths, in world px, of the two framings the zoom scenario swaps between — about 20% and 21% on the benches’ 800 px viewport.

Functions§

drop_approach 🔒
The press and the moves of a drag. Past the click distance by a pixel first, as a pointer crosses it: the move that starts a drag carries no travel of its own.
drop_ends 🔒
Where this turn’s drag goes: out two cells, then back.
drop_release 🔒
far_out 🔒
A world rect of width about the sheet’s middle, in the viewport’s shape.
frame 🔒
nothing 🔒