iris: iris::input/iris::frame diagnostics, and gating the four debug! lines that already drowned the ring
Iris asked for a button to copy raw input events and per-frame timings through the same report Copy report already produces. sense::log_input_event (one line per platform pointer sample, historical samples inline on Android) and diagnostics::log_frame (one line per frame: frame number, frame clock, time since last input, layout/draw durations, redraw kind, primitives on screen, animating) both land under iris::diagnostics's trace_enabled() gate, off by default since the ring is 2000 lines/256KiB and either target at 120Hz fills it in seconds. report_to_touch.py turns a report's iris::input lines back into a .touch file for harness/desktop replay, round-tripped in transcript-fixture's input_log_roundtrip test. Folds in docs/REVIEW-2026-09-07.md's D1: four older per-frame debug! lines (android::view's two render() lines, list.rs's fling tick, text/mod.rs's text render) were unconditional at Debug and, with the ring's RingLogger recording everything the app's Debug install lets through regardless of target, filled it before Copy report ever saw anything else. All four (and sense.rs's drag-release-samples line) are now behind the same gate. The same test proves both directions: tracing off leaves zero Debug lines from a replayed flick, tracing on produces the expected iris::input/iris::frame lines with real durations. Not wired to a Diagnostics-pane button: bench_client.rs is open under another agent. set_trace(bool) is the whole surface a control needs. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
1 parent
729098756d
commit
992c472975
16 files changed
+910
-57
No files matched your search
+21
-11
@@ -1046,17 +1046,27 @@ do not duplicate it there.
|
||||
estimator and none of the rest. The release log gains a debug
|
||||
`iris drag release samples:` line so a flick reported from the phone can
|
||||
be replayed at layer 1.
|
||||
- [ ] **Input-event and timing report from the phone.** Iris: "add
|
||||
- [~] **Input-event and timing report from the phone.** Iris: "add
|
||||
another button to copy input event info so that I can do some stuff
|
||||
manually and then send the event log to you ... instrument a lot of
|
||||
the code with timings so I can give you time reports through the
|
||||
same button." Build on the log ring (queue: logging through Dev
|
||||
Updater), not beside it: every `MotionEvent` (action, pointer
|
||||
position, event time, historical sample count) and every gesture
|
||||
decision (`iris drag release:` and its siblings) at debug level into
|
||||
the ring; frame timings (input handled -> layout -> draw submitted,
|
||||
and the fling tick's `now` against the frame clock) at debug level
|
||||
into the same ring; "Copy report" already appends the ring. Add a
|
||||
second button only if the report gets too long to paste -- then
|
||||
"Copy input log" copies the ring alone. Says which build it came
|
||||
from.
|
||||
same button." **Built on the log ring, 2026-09-07** (docs/RUST.md's
|
||||
own section): `iris::sense::log_input_event` (one line per platform
|
||||
pointer sample -- Android's `MotionEvent`, historical samples inline;
|
||||
winit's `WindowEvent`; the harness's `TouchScript` line) and
|
||||
`iris::diagnostics::log_frame` (one line per frame: frame number,
|
||||
the frame clock, time since the last input, layout/draw durations,
|
||||
`redraw_all`/`redraw_updates`/neither, primitives on screen,
|
||||
whether something is animating), both under
|
||||
`iris::diagnostics::trace_enabled()`, off by default because the ring
|
||||
is only 2000 lines / 256 KiB and both targets at 120Hz fill that in
|
||||
seconds. `iris/benches/report_to_touch.py` turns a report's
|
||||
`iris::input` lines back into a `.touch` file for layer 1/2 replay --
|
||||
round-tripped in `iris/transcript-fixture/tests/
|
||||
input_log_roundtrip.rs`. **Not wired to a button**: the Diagnostics
|
||||
pane is `iris/android-app/src/bench_client.rs`, open under another
|
||||
agent at the time this landed; `set_trace(bool)` is the whole surface
|
||||
a control needs. `docs/REVIEW-2026-09-07.md`'s D1 (the ring already
|
||||
drowned in per-frame `debug!` lines that predated this pass) is fixed
|
||||
in the same change -- see RUST.md's section for which four call
|
||||
sites.
|
||||
Reference in new issue
Block a user