mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2026-05-21 13:26:29 +03:00
Measure RTT, report in getPeers (#1143)
Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
@@ -33,6 +33,7 @@ type PeerInfo struct {
|
||||
RXBytes uint64
|
||||
TXBytes uint64
|
||||
Uptime time.Duration
|
||||
Latency time.Duration
|
||||
}
|
||||
|
||||
type TreeEntryInfo struct {
|
||||
@@ -92,6 +93,7 @@ func (c *Core) GetPeers() []PeerInfo {
|
||||
peerinfo.Root = p.Root
|
||||
peerinfo.Port = p.Port
|
||||
peerinfo.Priority = p.Priority
|
||||
peerinfo.Latency = p.Latency
|
||||
}
|
||||
peers = append(peers, peerinfo)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user