Skip to content

dash(web): per-rig TCP latency column in workers-table#768

Merged
frstrtr merged 1 commit into
masterfrom
dash/per-rig-latency-column
Jul 20, 2026
Merged

dash(web): per-rig TCP latency column in workers-table#768
frstrtr merged 1 commit into
masterfrom
dash/per-rig-latency-column

Conversation

@frstrtr

@frstrtr frstrtr commented Jul 20, 2026

Copy link
Copy Markdown
Owner

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::WorkerInfo gains rtt_ms, sampled from getsockopt(fd, IPPROTO_TCP, TCP_INFO).tcpi_rtt / 1000 (the same value ss -ti prints) — populated at connect and refreshed on each periodic worker-stats update.
  • New non-pure virtual update_stratum_worker_rtt (default no-op) so the five per-coin work sources (LTC/DOGE/DGB/DASH/BTC/BCH) need no override — only core MiningInterface stores it. Zero cross-coin ripple.
  • getminerstats JSON exposes rtt_ms per worker (worst/max across a worker s aggregated connections).
  • web-static/stratum.html workers-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 fake 0.

Verification

Builds green locally (c2pool-dash target, exit 0). Non-consensus web layer → normal merge; awaiting CI CLEAN before merge-tap.

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.
@frstrtr
frstrtr merged commit e336f5d into master Jul 20, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant