Measure RTT, report in getPeers (#1143)

Co-authored-by: Neil Alexander <neilalexander@users.noreply.github.com>
This commit is contained in:
Neil 2024-05-30 22:46:06 +01:00 committed by GitHub
parent fcefb20993
commit f788a18bef
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 14 additions and 5 deletions

View file

@ -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)
}