mirror of
https://github.com/LBRYFoundation/lbry-sdk.git
synced 2025-10-02 08:10:34 +00:00
mbps instead of mbs, remove time from connection status
This commit is contained in:
parent
347415dceb
commit
a90919a9ba
2 changed files with 8 additions and 10 deletions
|
@ -52,9 +52,8 @@ class ConnectionManager:
|
|||
self._status = {
|
||||
'incoming_bps': {},
|
||||
'outgoing_bps': {},
|
||||
'total_incoming_mbs': 0.0,
|
||||
'total_outgoing_mbs': 0.0,
|
||||
'time': self.loop.time()
|
||||
'total_incoming_mbps': 0.0,
|
||||
'total_outgoing_mbps': 0.0,
|
||||
}
|
||||
|
||||
while True:
|
||||
|
@ -69,10 +68,10 @@ class ConnectionManager:
|
|||
k, v = self.incoming.popitem()
|
||||
self._status['incoming_bps'][k] = v
|
||||
now = self.loop.time()
|
||||
self._status['total_outgoing_mbs'] = int(sum(list(self._status['outgoing_bps'].values())
|
||||
) / (now - last)) / 1000000.0
|
||||
self._status['total_incoming_mbs'] = int(sum(list(self._status['incoming_bps'].values())
|
||||
) / (now - last)) / 1000000.0
|
||||
self._status['total_outgoing_mbps'] = int(sum(list(self._status['outgoing_bps'].values()))
|
||||
/ (now - last)) / 1000000.0
|
||||
self._status['total_incoming_mbps'] = int(sum(list(self._status['incoming_bps'].values()))
|
||||
/ (now - last)) / 1000000.0
|
||||
self._status['time'] = now
|
||||
|
||||
def stop(self):
|
||||
|
|
|
@ -747,9 +747,8 @@ class Daemon(metaclass=JSONRPCServerType):
|
|||
'outgoing_bps': {
|
||||
<destination ip and tcp port>: (int) bytes per second sent,
|
||||
},
|
||||
'total_outgoing_mps': (float) megabytes per second sent,
|
||||
'total_incoming_mps': (float) megabytes per second received,
|
||||
'time': (float) timestamp
|
||||
'total_outgoing_mbps': (float) megabytes per second sent,
|
||||
'total_incoming_mbps': (float) megabytes per second received
|
||||
}
|
||||
},
|
||||
'hash_announcer': {
|
||||
|
|
Loading…
Add table
Reference in a new issue