add single_hash_announce_duration as a field that gets return for API call status for dht status

This commit is contained in:
Kay Kurokawa 2017-11-08 22:50:40 -05:00 committed by Jack Robison
parent 0f3385e4dc
commit 60c7261871
No known key found for this signature in database
GPG key ID: DF25C68FE0239BB2

View file

@ -1042,11 +1042,12 @@ class Daemon(AuthJSONRPCServer):
'dht_status': {
'kbps_received': current kbps receiving,
'kbps_sent': current kdps being sent,
'total_bytes_sent': total bytes sent,
'total_bytes_received': total bytes received,
'queries_received': number of queries received per second,
'queries_sent': number of queries sent per second,
'recent_contacts': count of recently contacted peers,
'total_bytes_sent': total bytes sent
'total_bytes_received': total bytes received
'queries_received': number of queries received per second
'queries_sent': number of queries sent per second
'recent_contacts': count of recently contacted peers
'single_hash_announce_duration': avg. seconds it takes to announce a blob
'unique_contacts': count of unique peers
},
}
@ -1097,6 +1098,8 @@ class Daemon(AuthJSONRPCServer):
}
if dht_status:
response['dht_status'] = self.session.dht_node.get_bandwidth_stats()
response['dht_status'].update({'single_hash_announce_duration':
self.session.blob_manager.single_hash_announce_duration})
defer.returnValue(response)
def jsonrpc_version(self):