Repository navigation
Conversation
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
Linearize peer availability and frame admission under the track state lock. Preserve negotiation queuing and reopen admission after peer recovery. Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Keep the timestamp clock bridge on a dedicated input-source extension. Measure IUILoop claim and the first following window write. Remove transport-specific and duplicated stage instrumentation. Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Define WebRTC timing at the existing single-slot sender mailbox write. Keep active-peer delivery and display timing in matching client telemetry. Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
Good catch to check this race. |
…r-input-latency-instrumentation Signed-off-by: Ziming Wang <zimingwang945@gmail.com> # Conflicts: # flashdreams/flashdreams/runtime_v2/application_runner.py # flashdreams/flashdreams/runtime_v2/cli.py # flashdreams/flashdreams/runtime_v2/session_runner.py # flashdreams/flashdreams/runtime_v2/webrtc_client_window.py
|
Pulled #548's multi-session lifecycle into Each replacement now gets a fresh clock binding and an independent JSONL segment, with WebRTC's rebased timestamps mapped back to the correct monotonic session origin. The complete V2 CPU suite passes: 211 passed, 3 deselected. The two metrics remain anchored at IUILoop claim and the first following window write (ง •̀_•́)ง |
|
I rechecked this against current HEAD and the PR diff. This review keeps the transport contract unchanged and keeps #574 scoped to the two host-side perceived-latency checkpoints (•̀ᴗ•́)و |
…r-input-latency-instrumentation Signed-off-by: Ziming Wang <zimingwang945@gmail.com> # Conflicts: # flashdreams/flashdreams/runtime_v2/session_runner.py
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
Synced current |
jmccaffrey-nv
left a comment
There was a problem hiding this comment.
Reviewed the implementation against #538, including native/WebRTC clock bridging, replacement-session ownership, correlation, cleanup, path collisions, security, and profiler overhead.
The PR satisfies the narrowed host-side checkpoints discussed on the issue: event receipt to IUILoop claim, and event receipt to the next window.write return. The latter is not causal or end-to-end perceived response latency: the UI can re-render a held pre-input frame, and WebRTC stops at host queue admission before transport, decode, composition, and scanout. The documentation states these limits; please keep that distinction explicit when closing #538.
Local validation at 0e007995: 215 V2 CPU tests passed; focused Ruff formatting/import checks, ty, compileall, and git diff --check passed. The documentation build reached the new section without a new warning; its warning-as-error run still reports 10 unrelated baseline warnings. GitHub currently shows only the successful Greptile check while NVIDIA runner validation awaits vetting.
I left three inline comments on self-describing profile metadata, unbounded in-memory summary retention, and stable event-type serialization. I found no new code-execution, deserialization, dependency, or credential-handling exposure.
-- reviewed using GPT-5.6 Sol
|
/ok to test 0e00799 |
…r-input-latency-instrumentation Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
Addressed the three review threads in Validation: 185 V2 CPU tests passed, 5 skipped in the local optional-dependency environment; 88 focused tests passed, 1 skipped; Ruff, focused |
|
Want your agent to iterate on Greptile's feedback? Try greploops. |
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
I've synced the profiling change with the new model-metrics sink on Both outputs keep their session lifecycle, and replacement sessions retain independent profile segments. I've updated the validation section for the current branch. |
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
Signed-off-by: Ziming Wang <zimingwang945@gmail.com>
|
@jmccaffrey-nv, |
Why
Interactive input latency needs explicit clock and endpoint definitions. A session-relative input timestamp can be compared with runtime observations when the input source supplies its monotonic-clock origin. The runtime can then report where time accumulates between event arrival, UI consumption, and the next host-side window write.
Closes #538 by adding opt-in V2 host-side input profiling through
flashdreams-run-v2 --profile-path.What changed
TimestampedInputSourceat the input-source boundary. Native-window and WebRTC sources provide the monotonic origin for their session-relative event timestamps; a source without a shared origin produces session metadata and empty latency summaries.RuntimeProfilerand pass it throughApplicationRunnerintorun_session. The presenting rank owns the writer, and model workers reject a supplied profiler before opening an artifact. Profile cleanup follows the existing session cleanup and primary-error handling.input_to_ui_step_swhen the IUILoop claims an event andinput_to_window_write_swhen the first followingIClientWindow.writereturns. The current list-of-frames API writes its single presented frame and records completion after that write.session_startedrecord includes the clock origin, concrete window type, frame layout, rates, resolution, presentation mode, backpressure mode, and measurement endpoints. Reset generations prevent a later write from matching an earlier generation's pending input.quantile_sample_countandquantiles_approximatein the artifact. Claimed inputs are retained separately until a following write, generation change, or session close.The current head
47fec3fe691ac170419bf9496ce2c03792436120merges main atfd52f1a1f4076f86f3fcb86cf5a4425497804b65, preserving application preparation, cross-session step budgets, deadlines, and distributed cleanup.Verification
Current-head checks on macOS arm64, Python 3.12.14, and PyTorch 2.14.1:
all_reducegit diff --checkpassedslangpyimport diagnostics; the corresponding unmodified main files reproduced the same three diagnostics in this CPU environmentRun the existing suite with
uv run pytest -m ci_cpu flashdreams/test_v2. The suite completed with aiortc pending-task teardown diagnostics in the WebRTC tests.The metrics end at UI claim and host write return: native-window includes the presenter call, and WebRTC includes queue admission when a video track exists; causal frame response, browser/network delivery, physical display, and GPU generation remain outside these measurements. Profiling writes add host overhead, so direct timing comparisons should enable the same profiling configuration on both runs.