server: log get_stats time
The DB queries this uses aren't particularly efficient, and when the time it takes to run starts to become a problem, we should do an optimization pass.
This commit is contained in:
parent
45d46643ca
commit
930ed2c089
|
@ -125,8 +125,10 @@ class RelayServer(service.MultiService):
|
|||
data["created"] = now
|
||||
data["valid_until"] = now + validity
|
||||
|
||||
start = time.time()
|
||||
data["rendezvous"] = self._rendezvous.get_stats()
|
||||
data["transit"] = self._transit.get_stats()
|
||||
log.msg("get_stats took:", time.time() - start)
|
||||
|
||||
with open(tmpfn, "wb") as f:
|
||||
json.dump(data, f, indent=1)
|
||||
|
|
Loading…
Reference in New Issue
Block a user