From f9c9efe88d2e509a838fa124a706e8d52003a86d Mon Sep 17 00:00:00 2001 From: "Olivier Wilkinson (reivilibre)" Date: Fri, 11 Nov 2022 12:32:04 +0000 Subject: Measure listening time --- synapse/app/generic_worker.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/synapse/app/generic_worker.py b/synapse/app/generic_worker.py index cb5892f041..73ec81a9c6 100644 --- a/synapse/app/generic_worker.py +++ b/synapse/app/generic_worker.py @@ -14,6 +14,7 @@ # limitations under the License. import logging import sys +import time from typing import Dict, List, Optional, Tuple from twisted.internet import address @@ -393,6 +394,7 @@ class GenericWorkerServer(HomeServer): logger.info("Synapse worker now listening on port %d", port) def start_listening(self) -> None: + start = time.time() for listener in self.config.worker.worker_listeners: if listener.type == "http": self._listen_http(listener) @@ -418,6 +420,9 @@ class GenericWorkerServer(HomeServer): else: logger.warning("Unsupported listener type: %s", listener.type) + end = time.time() + logger.error("TIMING start_listening %.6f", end - start) + self.get_replication_command_handler().start_replication(self) -- cgit 1.4.1