This repository was archived by the owner on Aug 7, 2026. It is now read-only.
Repository navigation
Improve TUI and latency calculations - #83
Merged
Merged
Conversation
Replace time.time() with time.monotonic_ns()//1000 (NTP-safe), capture edge_tx_ts_us inside serial.lock just before write, capture edge_rx_ts_us when HDLC payload becomes READY on the RX thread. Removes mari.lock contention and clock-step noise from measured RTT. AI-assisted: Claude Opus 4.7
Probes already carry gw_tx_enqueued_asn / node_rx_asn / node_tx_enqueued_asn / gw_rx_asn — convert to ms via the 1.7240 ms slot duration and display the host/dl/app/ul breakdown alongside the total RTT in one cell. Add a 'TX queue (sf)' column showing ul_ms / sf_duration as a slotframe-deep queue estimate, with a header ⚠ warning when any node's queue exceeds the threshold. See docs/mari-protocol-summary.md for the path decomposition. AI-assisted: Claude Opus 4.7
…lper Match the bold-yellow style of the Latency and Stats labels for PDR so the three metric labels look consistent. Insert the missing space before 'ms' in the latency average. Normalize trailing-space and separator inconsistencies in the Stats line. Drop the unused MariNode.stats_uplink_utilization helper added during prototyping. AI-assisted: Claude Opus 4.7
Short column headers stay short ('Q (sf)' rather than 'TX queue
(sf)'); the meaning of each latency leg and the queue-depth coloring
goes in a 'Reading the TUI' README section instead.
AI-assisted: Claude Opus 4.7
CI's ruff check rejected a module-level import that came after the constants; reorder so all imports stay at the top. AI-assisted: Claude Opus 4.7
Replace the 1/20/1 wire-layout literals with sums over Header() and HeaderStats() metadata, so the offset survives any reordering of the Mari header layout (today both still compute to 20 and 1). Only the leading EdgeEvent prefix byte stays a literal. Also carries the prior hatch fmt pass over the touched files. AI-assisted: Claude Opus 4.7
geonnave
force-pushed
the
latency-stamping-fix
branch
from
May 18, 2026 10:01
5e2bdc0 to
4ef1e1a
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Make latency more accurate at python side, a bunch of TUI improvements.
Testing of Node / Gateway (if applicable)
_1_nodes and_1_gateways._10_minutes