feat(rtt): 'machine rtt' command to show round-trip time between macines usign using gossip data (#226)

* Add corrosion admin client function to get RTT to other machines in the cluster

* Add `uc machine rtt` showing all pair-wise RTT stats from corrosion

* Add long description to machine rtt command

* Include machine peer RTTs in InspectMachine instead of adding new gRPC API for it

* Add nil check on InspectMachine's Rtt field to protect from a potential edge case

* Generate docs for machine rtt command

* Handle m.Message being nil when a node is down or unavailble

* Update cli-docs

* Use tui Table instead of tabwriter

* Change reported RTT to the median rather than mean. Still calculate include stddev, as it might be a useful indication of network jitter.

* Show RTT to peers in `wg show` output

* Update cli docs
This commit is contained in:
Justin Bradford
2026-04-20 08:01:20 +10:00
committed by GitHub
parent 1c0d48cb46
commit 8d023f5c53
10 changed files with 564 additions and 156 deletions
+5
View File
@@ -344,3 +344,8 @@ func (c *Cluster) RemoveMachine(ctx context.Context, req *pb.RemoveMachineReques
return &emptypb.Empty{}, nil
}
// MemberRTTs returns the average and standard deviation of round-trip times from this member to each cluster member.
func (c *Cluster) MemberRTTs() ([]corrosion.MemberRTTStats, error) {
return c.corroAdmin.ClusterMemberRTTs()
}