Responsiveness: the second pass, measured on the panel it is for
Records the A/B for all six remaining items — device-reverted between runs, same database, same radio — and what the console readback proved: the composited quit confirm is byte-identical to prompt_toolkit's own output across all three captures, and so is the mesh walk's settled graph at 339 nodes and 1155 links. The rework changed the time and nothing else. Also the one thing that got slower. Paging into rows never drawn before is 154 ms against 84 ms, because a cold row costs 3.9 ms and 3.4 ms of that is Rich's console.print — measured on the device, so there is nothing to shave short of not using Rich for rows. That work did not grow; it moved off the open, where it used to cost ~585 ms of the second Contacts took to appear, onto the page you actually visit, once. The harness gains the tour that did the A/B, and the note that reverting the device beats rebuilding it. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2decbcf754
commit
4466d75932
2 files changed
+115
-2
No files matched your search
@@ -45,8 +45,22 @@ along live), injects the scripted keys, and prints p50/p90/max per key group.
|
||||
|
||||
Tour scripts are one step per line: `down 8`, `enter`, `text:y`, `sleep 3`,
|
||||
`label: contacts` to start a new measurement group, `shot NAME` to grab the screen.
|
||||
`tours/` has `nav_all.txt` (every page), `nav_ab.txt` (short, for A/B runs) and
|
||||
`nav_map.txt`.
|
||||
`tours/` has `nav_all.txt` (every page), `nav_ab.txt` (short, for A/B runs),
|
||||
`nav_opens.txt` (screen opens, timed with `expect`), `nav_map.txt`, and
|
||||
`nav_changed.txt` (every optimised paint plus a real dialog — the A/B tour).
|
||||
|
||||
## A/B'ing a change: revert the device, don't rebuild it
|
||||
|
||||
The device tree is a git checkout, so the cleanest before/after is to `scp` the changed
|
||||
modules in, run the tour, then `git checkout -- meshterm/` and run it again. Same panel,
|
||||
same database, same radio, minutes apart — nothing else gets that close. Drop the
|
||||
`__pycache__` between runs (`find meshterm -name __pycache__ -type d -exec rm -rf {} +`)
|
||||
and remember to push the files back afterwards.
|
||||
|
||||
Then diff the shots (`cmp -s before/NN_x.txt after/NN_x.txt`). Screens carrying live data
|
||||
(the header's counters, a heard-sorted contact list) legitimately differ; a screen whose
|
||||
content is fixed for the run — a dialog over the menu, the mesh walk's settled graph — must
|
||||
come back **identical**, and that is what proves a rendering change only changed the time.
|
||||
|
||||
## Timing a screen *open* — use `expect`, not silence
|
||||
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
# The A/B tour: one pass over every screen whose paint has ever been optimised, plus a real
|
||||
# dialog. Run it, revert `meshterm/` on the device, run it again — same panel, same database,
|
||||
# same radio, minutes apart. That is the only honest before/after this app has.
|
||||
#
|
||||
# The dialog group is the quit confirm over the main menu: the easiest real dialog to reach
|
||||
# from anywhere, and safe to drive because only the arrows and Esc are sent (Enter would
|
||||
# commit the right-hand button, which is Quit).
|
||||
#
|
||||
# Read `dialog-keys`, not `dialog-open`/`dialog-close` — an Esc reading is console-quiescence
|
||||
# overshoot, and a paint that lands outside the window reports a false-fast 7-byte result.
|
||||
|
||||
label: splash
|
||||
down 1
|
||||
up 1
|
||||
label: connect
|
||||
enter
|
||||
sleep 25
|
||||
|
||||
label: main-menu
|
||||
down 6
|
||||
up 4
|
||||
|
||||
# --- Contacts (row 5) ---
|
||||
label: nav
|
||||
pgup 2
|
||||
down 5
|
||||
label: open-contacts
|
||||
enter
|
||||
expect known
|
||||
sleep 2
|
||||
label: contacts-move
|
||||
down 6
|
||||
up 4
|
||||
label: contacts-page
|
||||
pgdn 2
|
||||
label: contacts-type
|
||||
text:y
|
||||
text:u
|
||||
sleep 1
|
||||
backspace 2
|
||||
esc
|
||||
sleep 3
|
||||
|
||||
# --- Dashboard (row 3) ---
|
||||
label: nav
|
||||
pgup 2
|
||||
down 3
|
||||
label: open-dashboard
|
||||
enter
|
||||
expect mesh overview
|
||||
sleep 2
|
||||
label: dashboard
|
||||
down 4
|
||||
up 3
|
||||
esc
|
||||
sleep 3
|
||||
|
||||
# --- Mesh walk (row 7) ---
|
||||
label: nav
|
||||
pgup 2
|
||||
down 7
|
||||
label: open-walk
|
||||
enter
|
||||
expect links
|
||||
sleep 2
|
||||
label: walk
|
||||
down 3
|
||||
up 2
|
||||
esc
|
||||
sleep 3
|
||||
|
||||
# --- A real dialog over the menu: the quit confirm. Arrows only; Esc backs out. ---
|
||||
label: nav
|
||||
pgup 2
|
||||
label: dialog-open
|
||||
esc
|
||||
sleep 2
|
||||
label: dialog-keys
|
||||
left 4
|
||||
right 4
|
||||
label: dialog-close
|
||||
esc
|
||||
sleep 2
|
||||
|
||||
# --- Map (row 6), last: the heaviest screen ---
|
||||
label: nav
|
||||
pgup 2
|
||||
down 6
|
||||
label: open-map
|
||||
enter
|
||||
sleep 10
|
||||
label: map-pan
|
||||
right 2
|
||||
down 2
|
||||
label: map-zoom
|
||||
pgdn 1
|
||||
pgup 1
|
||||
esc
|
||||
sleep 3
|
||||
Reference in new issue
Block a user