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:
Brian Warner 2016-06-26 17:16:22 -07:00
parent 45d46643ca
commit 930ed2c089

View File

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