dash(web): per-rig TCP latency column in workers-table#768
Merged
Conversation
Surface real per-miner network latency in the stratum workers-table, completing the #764 dashboard wiring scope. - WorkerInfo gains rtt_ms, sampled from getsockopt(TCP_INFO).tcpi_rtt/1000 (same value ss -ti reports) at connect + on each periodic worker-stats update; Linux-only guard, 0/"-" elsewhere or on a closed socket. - New non-pure virtual update_stratum_worker_rtt (default no-op) so the per-coin work sources need no override; only core MiningInterface stores it. - getminerstats JSON exposes rtt_ms per worker (max across a worker s connections when aggregated). - stratum.html workers-table gets a Latency (ms) column: green <20ms, red >100ms, dash when unknown. Honest-absence invariant kept: never a fake zero, - when unmeasurable.
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Completes the per-rig Latency (ms) column folded into the #764 DASH dashboard-wiring scope — #764 merged as pure WebServer wiring, so this lands the latency piece as its own small additive PR.
What
core::stratum::WorkerInfogainsrtt_ms, sampled fromgetsockopt(fd, IPPROTO_TCP, TCP_INFO).tcpi_rtt / 1000(the same valuess -tiprints) — populated at connect and refreshed on each periodic worker-stats update.update_stratum_worker_rtt(default no-op) so the five per-coin work sources (LTC/DOGE/DGB/DASH/BTC/BCH) need no override — only coreMiningInterfacestores it. Zero cross-coin ripple.getminerstatsJSON exposesrtt_msper worker (worst/max across a worker s aggregated connections).web-static/stratum.htmlworkers-table: new Latency (ms) column — green <20ms, red >100ms,-when unmeasurable.Honesty invariant
Linux-only (
#ifdef __linux__); non-Linux nodes or closed sockets render-, never a fake0.Verification
Builds green locally (
c2pool-dashtarget, exit 0). Non-consensus web layer → normal merge; awaiting CI CLEAN before merge-tap.