mirror of
https://github.com/markqvist/NomadNet.git
synced 2025-06-24 22:20:35 -04:00
Added acceptance rate to PN peer stats
This commit is contained in:
parent
46f3a4127c
commit
a26edd21db
1 changed files with 2 additions and 1 deletions
|
@ -1807,10 +1807,11 @@ class LXMFPeerEntry(urwid.WidgetWrap):
|
||||||
txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
|
txfer_limit = RNS.prettysize(peer.propagation_transfer_limit*1000)
|
||||||
else:
|
else:
|
||||||
txfer_limit = "No"
|
txfer_limit = "No"
|
||||||
|
ar = round(peer.acceptance_rate*100, 2)
|
||||||
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
|
peer_info_str = sym+" "+display_str+"\n "+alive_string+", last heard "+pretty_date(int(peer.last_heard))
|
||||||
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {txfer_limit} sync limit\n"
|
peer_info_str += "\n "+str(peer.unhandled_message_count)+f" unhandled LXMs, {txfer_limit} sync limit\n"
|
||||||
peer_info_str += f" {RNS.prettyspeed(peer.sync_transfer_rate)} STR, "
|
peer_info_str += f" {RNS.prettyspeed(peer.sync_transfer_rate)} STR, "
|
||||||
peer_info_str += f"{RNS.prettyspeed(peer.link_establishment_rate)} LER\n"
|
peer_info_str += f"{RNS.prettyspeed(peer.link_establishment_rate)} LER, {ar}% AR\n"
|
||||||
widget = ListEntry(peer_info_str)
|
widget = ListEntry(peer_info_str)
|
||||||
self.display_widget = urwid.AttrMap(widget, style, focus_style)
|
self.display_widget = urwid.AttrMap(widget, style, focus_style)
|
||||||
self.display_widget.destination_hash = destination_hash
|
self.display_widget.destination_hash = destination_hash
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue